diff options
author | Andrew Tridgell <tridge@samba.org> | 1996-06-07 03:34:22 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1996-06-07 03:34:22 +0000 |
commit | 88b191b48836eeb7937f25b37d0bdd4a2276e5a7 (patch) | |
tree | 029183b29f3787bcbb34b61475bd02ad554d30e0 /source/nmbsync.c | |
parent | 5a0d016b2432da9299d92b33d723534d91c8dcf4 (diff) | |
download | samba-88b191b48836eeb7937f25b37d0bdd4a2276e5a7.tar.gz samba-88b191b48836eeb7937f25b37d0bdd4a2276e5a7.tar.xz samba-88b191b48836eeb7937f25b37d0bdd4a2276e5a7.zip |
- added predict.c, moving the routines from util.c
- added iface_count() and iface_n_ip() routines so its easy to loop
over the local interface list
- made readsize a normal loadparm global
- check for null w in add_domain_entry()
- set the deathtime to time()-1 for doamin entries with servertype==0
This allows servers that are shutting down to be removed
- add the 0x1c name at startup if we are a WINS server. Previously we
added it only if we were a master
- loop over interfaces in add_my_domains(), so people don't have to
have a lmhosts file to get lp_workgroup() on all interfaces
- set add to True for find_workgroupstruct() in nmbsync, and check for
null return
- remove some ugly "errno = EBADF" bits. they just confused things.
Diffstat (limited to 'source/nmbsync.c')
-rw-r--r-- | source/nmbsync.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/nmbsync.c b/source/nmbsync.c index e86e8d53eb7..c9e0dfc4628 100644 --- a/source/nmbsync.c +++ b/source/nmbsync.c @@ -103,7 +103,6 @@ static BOOL add_info(struct domain_record *d, struct work_record *work, int serv uint32 stype = IVAL(p,18); int comment_offset = IVAL(p,22) & 0xFFFF; char *cmnt = comment_offset?(rdata+comment_offset-converter):""; - struct work_record *w = work; DEBUG(4, ("\t%-16.16s %08x %s\n", sname, stype, cmnt)); @@ -111,16 +110,17 @@ static BOOL add_info(struct domain_record *d, struct work_record *work, int serv if (stype & SV_TYPE_DOMAIN_ENUM) { /* creates workgroup on remote subnet */ - if ((w = find_workgroupstruct(d,sname, False))) + if ((w = find_workgroupstruct(d,sname, True))) { if (ismybcast(d->bcast_ip)) { announce_request(w, d->bcast_ip); } } - } + } - add_server_entry(d,w,sname,stype,lp_max_ttl(),cmnt,False); + if (w) + add_server_entry(d,w,sname,stype,lp_max_ttl(),cmnt,False); } } } |