summaryrefslogtreecommitdiff
path: root/source3/namedbname.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1996-08-20 15:45:16 +0000
committerAndrew Tridgell <tridge@samba.org>1996-08-20 15:45:16 +0000
commit748d65a4ac898708dc7d2fd6f2bdee41489fee86 (patch)
treeb54a4d77d71beba6e6422c366ecb17f57c172614 /source3/namedbname.c
parent7f38abfbdb57b4ed33fa0aaacdfe7414d4c19a28 (diff)
downloadsamba-748d65a4ac898708dc7d2fd6f2bdee41489fee86.tar.gz
samba-748d65a4ac898708dc7d2fd6f2bdee41489fee86.tar.bz2
samba-748d65a4ac898708dc7d2fd6f2bdee41489fee86.zip
- fix a bug in NetServerEnum where counted and total were not counted
correctly if there were multiple instances of a name. This led to the infamous "not enough memory" error when browsing (but this isn't the only cause of that message) - fix a triple-chaining bug which affected OpenX following a TconX - fix a serious nmbd bug that meant nmdb would answer packets that it wasn't supposed to, causing havoc with browse lists. - never time out SELF packets. This is an interim fix until I find out why nmbd thought they should be timed out. (This used to be commit 2960c3908c2c3b01a1f2b77def60350018d298e1)
Diffstat (limited to 'source3/namedbname.c')
-rw-r--r--source3/namedbname.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/source3/namedbname.c b/source3/namedbname.c
index 746353dd97..58b62bd0cb 100644
--- a/source3/namedbname.c
+++ b/source3/namedbname.c
@@ -238,9 +238,9 @@ void dump_names(void)
for (i = 0; i < n->num_ips; i++)
{
- DEBUG(3,("%15s NB=%2x ",
- inet_ntoa(n->ip_flgs[i].ip),
- n->ip_flgs[i].nb_flags));
+ DEBUG(3,("%15s NB=%2x source=%d",
+ inet_ntoa(n->ip_flgs[i].ip),
+ n->ip_flgs[i].nb_flags,n->source));
}
DEBUG(3,("\n"));
@@ -486,13 +486,17 @@ void expire_names(time_t t)
for (d = subnetlist; d; d = d->next)
{
for (n = d->namelist; n; n = next)
+ {
+ next = n->next;
+ if (n->death_time && n->death_time < t)
{
- if (n->death_time && n->death_time < t)
- {
+ if (n->source == SELF) {
+ DEBUG(3,("not expiring SELF name %s\n", namestr(&n->name)));
+ n->death_time += 300;
+ continue;
+ }
DEBUG(3,("Removing dead name %s\n", namestr(&n->name)));
- next = n->next;
-
if (n->prev) n->prev->next = n->next;
if (n->next) n->next->prev = n->prev;
@@ -501,11 +505,7 @@ void expire_names(time_t t)
free(n->ip_flgs);
free(n);
}
- else
- {
- next = n->next;
- }
- }
+ }
}
}