summaryrefslogtreecommitdiff
path: root/source3/nmbsync.c
diff options
context:
space:
mode:
authorSamba Release Account <samba-bugs@samba.org>1996-06-29 18:49:20 +0000
committerSamba Release Account <samba-bugs@samba.org>1996-06-29 18:49:20 +0000
commited2639ebe21dde49af816a96ec6ea1e40f76e768 (patch)
tree969aa897016d8e4f29d846cf23c5fa832ae6cf58 /source3/nmbsync.c
parent851ee418b499df481b765286405cd761e91dcaaf (diff)
downloadsamba-ed2639ebe21dde49af816a96ec6ea1e40f76e768.tar.gz
samba-ed2639ebe21dde49af816a96ec6ea1e40f76e768.tar.bz2
samba-ed2639ebe21dde49af816a96ec6ea1e40f76e768.zip
luke's first attempt at using cvs
accidentally updated the Makefile updated the name database structure (again!). this time, there is one name database per local interface. there is also a pseudo-interface on ip 255.255.255.255. its purpose is to store WINS name entries. all the local interface name databases store SELF names only. the WINS name database stores non-special browser names. added wins.dat file: records WINS entries in ascii format. this is reloaded when nmbd restarts. added repeating code for response packets. timer is in seconds only at the moment. updated the response queue code to deal with samba registering with a WINS server a bit better (added more cases when a response isn't received). tidied up the response packet processing code and expire_response_queue() code. added cross references between response received and await-response expired code. added over-zealous code that checks all machines that register with samba as a WINS server (every 10 minutes i think): to see whether they are still alive or not (see rfc1001.txt) bug reported by terry@ren.pc.athabascau.ca: DNSFAILed names _stay_ as DNSFAIL, even though the machine may come back up and REGISTER. removed update_from_reg() function. it's not necessary, and it does too much. added code that announces on each local interface samba's ttl as zero and servertype as zero when nmbd is kill -TERMed first attempt at putting the first functionality of samba browsing back in (remote subnets should have samba appear in a workgroup specified through the lmhosts file) lots of other miscellaneous tidying up / chopping about. (This used to be commit 7e8c60cfe54060860e5ce20b1c3b8ec6aa5c54da)
Diffstat (limited to 'source3/nmbsync.c')
-rw-r--r--source3/nmbsync.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source3/nmbsync.c b/source3/nmbsync.c
index 55cc9a04e9..2a95c60d59 100644
--- a/source3/nmbsync.c
+++ b/source3/nmbsync.c
@@ -102,6 +102,7 @@ static BOOL add_info(struct subnet_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));
@@ -137,10 +138,11 @@ static BOOL add_info(struct subnet_record *d, struct work_record *work, int serv
log in on the remote server's SMB port to their IPC$ service,
do a NetServerEnum and update our server and workgroup databases.
******************************************************************/
-void sync_browse_lists(struct work_record *work, char *name, int nm_type,
- struct in_addr ip)
+void sync_browse_lists(struct subnet_record *d, struct work_record *work,
+ char *name, int nm_type, struct in_addr ip)
{
- struct subnet_record *d;
+ if (!d || !work || !AM_MASTER(work)) return;
+
pid = getpid();
uid = getuid();
gid = getgid();
@@ -159,8 +161,6 @@ void sync_browse_lists(struct work_record *work, char *name, int nm_type,
if (zero_ip(dest_ip)) return;
have_ip = True;
- if (!(d = find_domain(ip))) return;
-
connect_as_ipc = True;
/* connect as server and get domains, then servers */