summaryrefslogtreecommitdiff
path: root/source3/namedbname.c
diff options
context:
space:
mode:
authorSamba Release Account <samba-bugs@samba.org>1996-07-09 18:01:46 +0000
committerSamba Release Account <samba-bugs@samba.org>1996-07-09 18:01:46 +0000
commit9fdb312a69bc966aed8d917843559cb235e17a10 (patch)
tree7d4761669c5bc9600cd3ae7f39a1f216561580fd /source3/namedbname.c
parent3545a9b8734bfabdff760253dd73216aad25b925 (diff)
downloadsamba-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/namedbname.c')
-rw-r--r--source3/namedbname.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/source3/namedbname.c b/source3/namedbname.c
index 3bff6dae7a..82b19077f9 100644
--- a/source3/namedbname.c
+++ b/source3/namedbname.c
@@ -222,21 +222,21 @@ void dump_names(void)
/* XXXX i have little imagination as to how to output nb_flags as
anything other than as a hexadecimal number :-) */
- sprintf(data, "%s#%02x %s %ld %2x",
+ sprintf(data, "%s#%02x %s %2x %ld",
n->name.name,n->name.name_type, /* XXXX ignore the scope for now */
inet_ntoa(n->ip),
- n->death_time,
- n->nb_flags);
+ n->nb_flags,
+ n->death_time);
fprintf(f, "%s\n", data);
}
DEBUG(3,("%15s ", inet_ntoa(d->bcast_ip)));
DEBUG(3,("%15s ", inet_ntoa(d->mask_ip)));
- DEBUG(3,("%s %15s TTL=%15d NBFLAGS=%2x\n",
+ DEBUG(3,("%-19s %15s NB=%2x TTL=%ld \n",
namestr(&n->name),
inet_ntoa(n->ip),
- n->death_time?n->death_time-t:0,
- n->nb_flags));
+ n->nb_flags,
+ n->death_time?n->death_time-t:0));
}
fclose(f);
@@ -490,6 +490,8 @@ struct name_record *search_for_name(struct subnet_record **d,
if (*d == NULL) return NULL;
+ DEBUG(4,("subnet %s ", inet_ntoa((*d)->bcast_ip)));
+
/* now try DNS lookup. */
if (!n)
{
@@ -497,7 +499,7 @@ struct name_record *search_for_name(struct subnet_record **d,
unsigned long a;
/* only do DNS lookups if the query is for type 0x20 or type 0x0 */
- if (!dns_type)
+ if (!dns_type && name_type != 0x1b)
{
DEBUG(3,("types 0x20 0x1b 0x0 only: name not found\n"));
return NULL;