summaryrefslogtreecommitdiff
path: root/source3/nameelect.c
diff options
context:
space:
mode:
authorSamba Release Account <samba-bugs@samba.org>1996-07-02 15:31:33 +0000
committerSamba Release Account <samba-bugs@samba.org>1996-07-02 15:31:33 +0000
commit7ca58ce114b4eafb2bb05d9e9699fe9effd8d9ec (patch)
tree867dd58fa56063c6afc6e4a8035dd1df27f71d54 /source3/nameelect.c
parentee1db519411a969413e60a875812f9909f71d525 (diff)
downloadsamba-7ca58ce114b4eafb2bb05d9e9699fe9effd8d9ec.tar.gz
samba-7ca58ce114b4eafb2bb05d9e9699fe9effd8d9ec.tar.bz2
samba-7ca58ce114b4eafb2bb05d9e9699fe9effd8d9ec.zip
as a result of the writing of namework.doc, namework.c has been tidied up,
some bugs fixed / documented and some discrepancies noted down (in namework.c as well as namework.doc) namebrowse.c and namelogon.c contain functions that were inappropriately placed in namework.c. namebrowse.c contains browse sync queue management functions that were inappropriately placed in namedb.c the 'cmd_type' member of response_record has been renamed to 'state' because that more accurately reflects it purpose (not entirely. sigh). fixed a bug in nameserv.c that meant the previous version wouldn't compile. there's probably a bit more... lkcl (This used to be commit a66417ebe871a1c1366c395ea4c7099852975e65)
Diffstat (limited to 'source3/nameelect.c')
-rw-r--r--source3/nameelect.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/source3/nameelect.c b/source3/nameelect.c
index c841d9b7a6..855ea26348 100644
--- a/source3/nameelect.c
+++ b/source3/nameelect.c
@@ -42,8 +42,6 @@ extern pstring ServerComment;
extern time_t StartupTime;
-#define BROWSE_MAILSLOT "\\MAILSLOT\\BROWSE"
-
extern struct subnet_record *subnetlist;
@@ -57,7 +55,7 @@ void check_master_browser(void)
struct subnet_record *d;
if (!lastrun) lastrun = t;
- if (t < lastrun + CHECK_TIME_MST_BROWSE * 60)
+ if (t < lastrun + CHECK_TIME_MST_BROWSE * 60)
return;
lastrun = t;
@@ -215,7 +213,7 @@ void become_nonmaster(struct subnet_record *d, struct work_record *work,
/* unbecome a master browser; unbecome a domain master, too :-( */
if (remove_type & SV_TYPE_MASTER_BROWSER)
remove_type |= SV_TYPE_DOMAIN_MASTER;
-
+
new_server_type &= ~remove_type;
if (!(new_server_type & (SV_TYPE_MASTER_BROWSER|SV_TYPE_DOMAIN_MASTER)))
@@ -223,8 +221,8 @@ void become_nonmaster(struct subnet_record *d, struct work_record *work,
/* no longer a master browser of any sort */
work->ServerType |= SV_TYPE_POTENTIAL_BROWSER;
- work->ElectionCriterion &= ~0x4;
-
+ work->ElectionCriterion &= ~0x4;
+
/* announce ourselves as no longer active as a master browser. */
announce_server(d, work, work->work_group, myname, 0, 0);
remove_name_entry(d,MSBROWSE ,0x01);
@@ -356,10 +354,10 @@ void process_election(struct packet_struct *p,char *buf)
/* if we are the master then remove our masterly names */
if (AM_MASTER(work))
- {
+ {
become_nonmaster(d, work,
SV_TYPE_MASTER_BROWSER|SV_TYPE_DOMAIN_MASTER);
- }
+ }
}
}
}