diff options
author | Andrew Tridgell <tridge@samba.org> | 2002-07-28 06:19:14 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2002-07-28 06:19:14 +0000 |
commit | ed9a219c8719063898c9b39ade0ba1b10739db98 (patch) | |
tree | 0bfab52870c9bf4c020c94bf56d1a299938186c1 | |
parent | c4fcf56380739cc58a2096aefe587bee50fde27d (diff) | |
download | samba-ed9a219c8719063898c9b39ade0ba1b10739db98.tar.gz samba-ed9a219c8719063898c9b39ade0ba1b10739db98.tar.bz2 samba-ed9a219c8719063898c9b39ade0ba1b10739db98.zip |
fix minor nits in nmbd from adtam@cup.hp.com
samba-patches 959
(This used to be commit ef04261e2510b658322336ce841b01f1c903eee2)
-rw-r--r-- | source3/nmbd/nmbd_mynames.c | 2 | ||||
-rw-r--r-- | source3/nmbd/nmbd_nameregister.c | 22 | ||||
-rw-r--r-- | source3/nmbd/nmbd_packets.c | 2 |
3 files changed, 13 insertions, 13 deletions
diff --git a/source3/nmbd/nmbd_mynames.c b/source3/nmbd/nmbd_mynames.c index 345245c57d..ba7d509a77 100644 --- a/source3/nmbd/nmbd_mynames.c +++ b/source3/nmbd/nmbd_mynames.c @@ -225,7 +225,7 @@ void refresh_my_names(time_t t) wins_refresh_name(namerec); } namerec->data.death_time = t + lp_max_ttl(); - namerec->data.refresh_time = t + MIN(lp_max_ttl(), MAX_REFRESH_TIME); + namerec->data.refresh_time = t + MIN(lp_max_ttl()/2, MAX_REFRESH_TIME); } } } diff --git a/source3/nmbd/nmbd_nameregister.c b/source3/nmbd/nmbd_nameregister.c index 4ac5473d4a..b6d3c20d99 100644 --- a/source3/nmbd/nmbd_nameregister.c +++ b/source3/nmbd/nmbd_nameregister.c @@ -106,17 +106,7 @@ static void register_name_response(struct subnet_record *subrec, success = False; } else { /* Unicast - check to see if the response allows us to have the name. */ - if(nmb->header.rcode != 0) { - /* Error code - we didn't get the name. */ - success = False; - - DEBUG(0,("register_name_response: %sserver at IP %s rejected our name registration of %s IP %s with error code %d.\n", - subrec==unicast_subnet?"WINS ":"", - inet_ntoa(p->ip), - nmb_namestr(answer_name), - reg_name, - nmb->header.rcode)); - } else if (nmb->header.opcode == NMB_WACK_OPCODE) { + if (nmb->header.opcode == NMB_WACK_OPCODE) { /* WINS server is telling us to wait. Pretend we didn't get the response but don't send out any more register requests. */ @@ -128,6 +118,16 @@ static void register_name_response(struct subnet_record *subrec, rrec->repeat_time = p->timestamp + nmb->answers->ttl; rrec->num_msgs--; return; + } else if (nmb->header.rcode != 0) { + /* Error code - we didn't get the name. */ + success = False; + + DEBUG(0,("register_name_response: %sserver at IP %s rejected our name registration of %s IP %s with error code %d.\n", + subrec==unicast_subnet?"WINS ":"", + inet_ntoa(p->ip), + nmb_namestr(answer_name), + reg_name, + nmb->header.rcode)); } else { success = True; /* Get the data we need to pass to the success function. */ diff --git a/source3/nmbd/nmbd_packets.c b/source3/nmbd/nmbd_packets.c index a20ebf16fd..4bd949f5a3 100644 --- a/source3/nmbd/nmbd_packets.c +++ b/source3/nmbd/nmbd_packets.c @@ -1670,7 +1670,7 @@ void retransmit_or_expire_response_records(time_t t) to IP %s on subnet %s\n", rrec->response_id, inet_ntoa(rrec->packet->ip), subrec->subnet_name)); } - rrec->repeat_time += rrec->repeat_interval; + rrec->repeat_time = t + rrec->repeat_interval; rrec->repeat_count--; } else |