svn commit: samba r15483 - branches/SAMBA_3_0/source/nmbd
trunk/source/nmbd
vlendec at samba.org
vlendec at samba.org
Sun May 7 09:21:40 GMT 2006
Author: vlendec
Date: 2006-05-07 09:21:39 +0000 (Sun, 07 May 2006)
New Revision: 15483
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=15483
Log:
Fix 'declaration after code' warnings.
Volker
Modified:
branches/SAMBA_3_0/source/nmbd/nmbd_elections.c
trunk/source/nmbd/nmbd_elections.c
Changeset:
Modified: branches/SAMBA_3_0/source/nmbd/nmbd_elections.c
===================================================================
--- branches/SAMBA_3_0/source/nmbd/nmbd_elections.c 2006-05-07 05:35:52 UTC (rev 15482)
+++ branches/SAMBA_3_0/source/nmbd/nmbd_elections.c 2006-05-07 09:21:39 UTC (rev 15483)
@@ -166,13 +166,16 @@
struct subnet_record *subrec;
+ START_PROFILE(run_elections);
+
/* Send election packets once every 2 seconds - note */
- if (lastime && (t - lastime < 2))
+ if (lastime && (t - lastime < 2)) {
+ END_PROFILE(run_elections);
return;
+ }
lastime = t;
- START_PROFILE(run_elections);
for (subrec = FIRST_SUBNET; subrec; subrec = NEXT_SUBNET_EXCLUDING_UNICAST(subrec)) {
struct work_record *work;
@@ -267,10 +270,11 @@
struct work_record *work;
unstring workgroup_name;
+ START_PROFILE(election);
+
pull_ascii_nstring(server_name, sizeof(server_name), buf+13);
pull_ascii_nstring(workgroup_name, sizeof(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",
Modified: trunk/source/nmbd/nmbd_elections.c
===================================================================
--- trunk/source/nmbd/nmbd_elections.c 2006-05-07 05:35:52 UTC (rev 15482)
+++ trunk/source/nmbd/nmbd_elections.c 2006-05-07 09:21:39 UTC (rev 15483)
@@ -166,13 +166,16 @@
struct subnet_record *subrec;
+ START_PROFILE(run_elections);
+
/* Send election packets once every 2 seconds - note */
- if (lastime && (t - lastime < 2))
+ if (lastime && (t - lastime < 2)) {
+ END_PROFILE(run_elections);
return;
+ }
lastime = t;
- START_PROFILE(run_elections);
for (subrec = FIRST_SUBNET; subrec; subrec = NEXT_SUBNET_EXCLUDING_UNICAST(subrec)) {
struct work_record *work;
@@ -267,10 +270,11 @@
struct work_record *work;
unstring workgroup_name;
+ START_PROFILE(election);
+
pull_ascii_nstring(server_name, sizeof(server_name), buf+13);
pull_ascii_nstring(workgroup_name, sizeof(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",
More information about the samba-cvs
mailing list