diff options
Diffstat (limited to 'source/nmbd/nmbd_become_dmb.c')
-rw-r--r-- | source/nmbd/nmbd_become_dmb.c | 108 |
1 files changed, 0 insertions, 108 deletions
diff --git a/source/nmbd/nmbd_become_dmb.c b/source/nmbd/nmbd_become_dmb.c index fe02f18f067..cfaec3378d2 100644 --- a/source/nmbd/nmbd_become_dmb.c +++ b/source/nmbd/nmbd_become_dmb.c @@ -37,114 +37,6 @@ extern uint16 samba_nb_type; /* Samba's NetBIOS type. */ static void become_domain_master_browser_bcast(char *); -/******************************************************************* - Unbecome a domain master browser - name release success function. - ******************************************************************/ - -static void unbecome_dmb_success(struct subnet_record *subrec, - struct userdata_struct *userdata, - struct nmb_name *released_name, - struct in_addr released_ip) -{ - struct work_record *work = find_workgroup_on_subnet(subrec, released_name->name); - struct server_record *servrec; - - if(!work) - { - DEBUG(0,("unbecome_dmb_success: Cannot find workgroup %s on subnet %s\n", - released_name->name, subrec->subnet_name)); - return; - } - - if((servrec = find_server_in_workgroup( work, global_myname)) == NULL) - { - DEBUG(0,("unbecome_dmb_success: Error - cannot find server %s \ -in workgroup %s on subnet %s\n", - global_myname, released_name->name, subrec->subnet_name)); - return; - } - - /* Set the state in the workgroup structure. */ - work->dom_state = DOMAIN_NONE; - - /* Update our server status. */ - servrec->serv.type &= ~SV_TYPE_DOMAIN_MASTER; - - /* Tell the namelist writer to write out a change. */ - subrec->work_changed = True; - - /* Remove any list of local master browsers we are syncing with. */ - remove_workgroup_lmb_browsers(released_name->name); - - /* Delete the known domain master browser name from the workgroup - struct. */ - bzero((char *)&work->dmb_name, sizeof(work->dmb_name)); - putip((char *)&work->dmb_addr, &ipzero); - - if( DEBUGLVL( 0 ) ) - { - dbgtext( "*****\n\nSamba server %s ", global_myname ); - dbgtext( "has stopped being a domain master browser " ); - dbgtext( "for workgroup %s ", work->work_group ); - dbgtext( "on subnet %s.\n\n*****\n", subrec->subnet_name ); - } - -} - -/******************************************************************* - Unbecome a domain master browser - name release fail function. - ******************************************************************/ - -static void unbecome_dmb_fail(struct subnet_record *subrec, - struct response_record *rrec, - struct nmb_name *released_name) -{ - if( DEBUGLVL( 0 ) ) - { - dbgtext( "unbecome_dmb_fail: Failed to unbecome domain master browser " ); - dbgtext( "for workgroup %s ", released_name->name ); - dbgtext( "on subnet %s.\n", subrec->subnet_name ); - } -} - -/******************************************************************* - Unbecome a domain master browser. - ******************************************************************/ - -void unbecome_domain_master(char *workgroup_name) -{ - struct subnet_record *subrec; - - for (subrec = FIRST_SUBNET; subrec; subrec = NEXT_SUBNET_INCLUDING_UNICAST(subrec)) - { - struct work_record *work = find_workgroup_on_subnet(subrec, workgroup_name); - - if(work && (work->dom_state == DOMAIN_MST)) - { - struct name_record *namerec; - struct nmb_name nmbname; - make_nmb_name(&nmbname,workgroup_name,0x1b,scope); - - /* We can only do this if we are a domain master already. */ - DEBUG(2,("unbecome_domain_master: attempting to stop being a domain \ -master browser for workgroup %s on subnet %s\n", - work->work_group, subrec->subnet_name)); - - /* Find the WORKGROUP<1b> name on the subnet namelist. */ - if((namerec = find_name_on_subnet(subrec, &nmbname, FIND_SELF_NAME))==NULL) - { - DEBUG(0,("unbecome_domain_master: Cannot find name %s on subnet %s.\n", - namestr(&nmbname), subrec->subnet_name)); - continue; - } - release_name(subrec, namerec, - unbecome_dmb_success, - unbecome_dmb_fail, - NULL); - } - } -} - /**************************************************************************** Fail to become a Domain Master Browser on a subnet. ****************************************************************************/ |