actuall delete the host from the table

This commit is contained in:
andreas
2007-07-11 19:50:06 +00:00
parent 6d3ccd0b4c
commit f7550b92e7
+2 -1
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env python #!/usr/bin/env python
# $Id: hbd,v 1.16 2007/04/05 15:51:13 andreas Exp $ # $Id: hbd,v 1.17 2007/07/11 19:50:06 andreas Exp $
# Wait for heartbeat messages and act on them (or their absence) # Wait for heartbeat messages and act on them (or their absence)
# #
import time, os, string, sys, socket, atexit, select, SocketServer, getopt, signal, cPickle import time, os, string, sys, socket, atexit, select, SocketServer, getopt, signal, cPickle
@@ -266,6 +266,7 @@ def fromaddr(name, addr, boot, interval):
host=hosts[name] host=hosts[name]
if host.addr != addr: if host.addr != addr:
log("%s changed address to %s" % (host.name, addr)) log("%s changed address to %s" % (host.name, addr))
if htab.has_key(host.addr):
del htab[host.addr] del htab[host.addr]
host.addr=addr host.addr=addr
htab[addr]=name htab[addr]=name