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 | d160d93d8fad563400aa1e1274437df1fbd4ecbf (patch) | |
tree | d6304b986418030366e6e8a9462dd6cd6ddcf72d /source3/nmbsync.c | |
parent | bb0a9664f56c168e11e6b127909f558e3b4f313d (diff) | |
download | samba-d160d93d8fad563400aa1e1274437df1fbd4ecbf.tar.gz samba-d160d93d8fad563400aa1e1274437df1fbd4ecbf.tar.bz2 samba-d160d93d8fad563400aa1e1274437df1fbd4ecbf.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.
(This used to be commit 88b191b48836eeb7937f25b37d0bdd4a2276e5a7)
Diffstat (limited to 'source3/nmbsync.c')
-rw-r--r-- | source3/nmbsync.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/nmbsync.c b/source3/nmbsync.c index e86e8d53eb..c9e0dfc462 100644 --- a/source3/nmbsync.c +++ b/source3/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); } } } |