From 7812ff08135318e74f5c286fe4773de8d1423969 Mon Sep 17 00:00:00 2001 From: Samba Release Account Date: Thu, 4 Jul 1996 19:19:26 +0000 Subject: modified become_master() to a state-based system. becoming a master is now performed in stages: wait for each NetBIOS name to be successfully registered before proceeding to the next stage. tied implicit name registration and release (broadcast method) to the same piece of code as explicit method (via WINS server). created special_browser_name() function that checks __MSBROWSE__ name: this name is ignored by WINS servers apparently. fixed likely incompatibility between refresh_my_names() and add_my_names(). (netbios entries were unlikely to be refreshed). NOTE: none of these changes have been tested. at all. lkcl (This used to be commit 7719fb06524a66ce5e3f30f3152ddb1e200c97f3) --- source3/include/nameserv.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source3/include/nameserv.h') diff --git a/source3/include/nameserv.h b/source3/include/nameserv.h index 9e4145213b..64a71b89ba 100644 --- a/source3/include/nameserv.h +++ b/source3/include/nameserv.h @@ -79,6 +79,8 @@ enum name_source {STATUS_QUERY, LMHOSTS, REGISTER, SELF, DNS, DNSFAIL}; enum node_type {B_NODE=0, P_NODE=1, M_NODE=2, NBDD_NODE=3}; enum packet_type {NMB_PACKET, DGRAM_PACKET}; +enum master_state { MST_NONE, MST_WON, MST_MSB, MST_BROWSER, MST_DOMAIN }; + enum state_type { NAME_STATUS_MASTER_CHECK, @@ -149,6 +151,9 @@ struct work_record struct server_record *serverlist; + /* stage of development from non-master to master browser / domain master */ + enum master_state state; + /* work group info */ fstring work_group; int token; /* used when communicating with backup browsers */ @@ -159,6 +164,7 @@ struct work_record int announce_interval; BOOL needannounce; + /* election info */ BOOL RunningElection; BOOL needelection; -- cgit