diff options
author | Herb Lewis <herb@samba.org> | 2001-09-05 18:43:55 +0000 |
---|---|---|
committer | Herb Lewis <herb@samba.org> | 2001-09-05 18:43:55 +0000 |
commit | 75287280717bc1f1411d2084d3295fffb1ccb391 (patch) | |
tree | a4448d0967356f1a44336c4652d4f05ac4883d3a /source3/nmbd/nmbd_elections.c | |
parent | dff3c815e2837ee0421298e3da7698bd3e01e0a6 (diff) | |
download | samba-75287280717bc1f1411d2084d3295fffb1ccb391.tar.gz samba-75287280717bc1f1411d2084d3295fffb1ccb391.tar.bz2 samba-75287280717bc1f1411d2084d3295fffb1ccb391.zip |
merge profile data changes from 2.2
(This used to be commit c105859304e93297fa29f346e9cbd1af0c95048b)
Diffstat (limited to 'source3/nmbd/nmbd_elections.c')
-rw-r--r-- | source3/nmbd/nmbd_elections.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source3/nmbd/nmbd_elections.c b/source3/nmbd/nmbd_elections.c index 522e268ae7..0fc3ab9a89 100644 --- a/source3/nmbd/nmbd_elections.c +++ b/source3/nmbd/nmbd_elections.c @@ -177,6 +177,7 @@ void run_elections(time_t t) lastime = t; + START_PROFILE(run_elections); for (subrec = FIRST_SUBNET; subrec; subrec = NEXT_SUBNET_EXCLUDING_UNICAST(subrec)) { struct work_record *work; @@ -215,6 +216,7 @@ yet registered on subnet %s\n", nmb_namestr(&nmbname), subrec->subnet_name )); } } } + END_PROFILE(run_elections); } /******************************************************************* @@ -276,6 +278,7 @@ void process_election(struct subnet_record *subrec, struct packet_struct *p, cha struct work_record *work; char *workgroup_name = dgram->dest_name.name; + START_PROFILE(election); server_name[15] = 0; DEBUG(3,("process_election: Election request from %s at IP %s on subnet %s for workgroup %s.\n", @@ -287,14 +290,14 @@ void process_election(struct subnet_record *subrec, struct packet_struct *p, cha { DEBUG(0,("process_election: Cannot find workgroup %s on subnet %s.\n", workgroup_name, subrec->subnet_name )); - return; + goto done; } if (!strequal(work->work_group, global_myworkgroup)) { DEBUG(3,("process_election: ignoring election request for workgroup %s on subnet %s as this \ is not my workgroup.\n", work->work_group, subrec->subnet_name )); - return; + goto done; } if (win_election(work, version,criterion,timeup,server_name)) @@ -325,6 +328,8 @@ is not my workgroup.\n", work->work_group, subrec->subnet_name )); unbecome_local_master_browser(subrec, work, False); } } +done: + END_PROFILE(election); } /**************************************************************************** |