diff options
author | Samba Release Account <samba-bugs@samba.org> | 1996-07-09 18:01:46 +0000 |
---|---|---|
committer | Samba Release Account <samba-bugs@samba.org> | 1996-07-09 18:01:46 +0000 |
commit | 9fdb312a69bc966aed8d917843559cb235e17a10 (patch) | |
tree | 7d4761669c5bc9600cd3ae7f39a1f216561580fd /source3/nameresp.c | |
parent | 3545a9b8734bfabdff760253dd73216aad25b925 (diff) | |
download | samba-9fdb312a69bc966aed8d917843559cb235e17a10.tar.gz samba-9fdb312a69bc966aed8d917843559cb235e17a10.tar.bz2 samba-9fdb312a69bc966aed8d917843559cb235e17a10.zip |
sorted out various timer delay bugs: nameannounce.c nameserv.c
namedbname.c:search_for_name() wasn't looking for 0x1b as well as
0x0 and 0x20 name types.
reduced number of retransmissions of packets from 4 to 3 times.
added code that ensures remote lmhosts entries don't get deleted when
a master browser cannot be found on a remote subnet. stopped forcing
an election on remote subnets if a master browser cannot be found.
stopped browse list and wins list from being written out too frequently.
only add samba's names to local interfaces.
add 0x1c name if we are a domain logon machine (needs more exploration).
why bother reloading services when receiving a SIGTERM?
sort out add_my_name_entry() and remove_name_entry() to deal with
broadcast, samba as a WINS and samba using a WINS. properly.
added extra debug information to help with expected response queue code.
updated debug comments in become_master().
altered dump_names() DEBUG format. it looks prettier.
altered wins.dat format to match DEBUG format.
lkcl
(This used to be commit 429f1f975e2936f2e220b656c51c211d48d47047)
Diffstat (limited to 'source3/nameresp.c')
-rw-r--r-- | source3/nameresp.c | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/source3/nameresp.c b/source3/nameresp.c index 0b38c4bb9a..3a9d46bf9d 100644 --- a/source3/nameresp.c +++ b/source3/nameresp.c @@ -35,8 +35,6 @@ extern pstring scope; extern struct in_addr ipzero; extern struct in_addr ipgrp; -extern int num_response_packets; - /*************************************************************************** deals with an entry before it dies @@ -174,14 +172,17 @@ static void dead_netbios_entry(struct subnet_record *d, ******************************************************************/ void expire_netbios_response_entries() { - struct response_record *n; - struct response_record *nextn; struct subnet_record *d; for (d = subnetlist; d; d = d->next) - for (n = d->responselist; n; n = nextn) + { + struct response_record *n, *nextn; + + for (n = d->responselist; n; n = nextn) { - if (n->repeat_time < time(NULL)) + nextn = n->next; + + if (n->repeat_time <= time(NULL)) { if (n->repeat_count > 0) { @@ -192,10 +193,13 @@ void expire_netbios_response_entries() n->repeat_time += n->repeat_interval; /* XXXX ms needed */ n->repeat_count--; + } else { - nextn = n->next; + DEBUG(4,("timeout response %d for %s %s\n", + n->response_id, namestr(&n->name), + inet_ntoa(n->send_ip))); dead_netbios_entry (d,n); /* process the non-response */ remove_response_record(d,n); /* remove the non-response */ @@ -203,8 +207,8 @@ void expire_netbios_response_entries() continue; } } - nextn = n->next; } + } } @@ -274,7 +278,10 @@ struct response_record *queue_netbios_packet(struct subnet_record *d, initiate_netbios_packet(&id, fd, quest_type, name, name_type, nb_flags, bcast, recurse, send_ip); - if (id == 0xffff) return NULL; + if (id == 0xffff) { + DEBUG(4,("did not initiate netbios packet: %s\n", inet_ntoa(send_ip))); + return NULL; + } if ((n = make_response_queue_record(state,id,fd, quest_type,name,name_type,nb_flags,ttl, |