summaryrefslogtreecommitdiff
path: root/source3/nmbd/nmbd_synclists.c
diff options
context:
space:
mode:
authorHerb Lewis <herb@samba.org>2001-09-05 18:43:55 +0000
committerHerb Lewis <herb@samba.org>2001-09-05 18:43:55 +0000
commit75287280717bc1f1411d2084d3295fffb1ccb391 (patch)
treea4448d0967356f1a44336c4652d4f05ac4883d3a /source3/nmbd/nmbd_synclists.c
parentdff3c815e2837ee0421298e3da7698bd3e01e0a6 (diff)
downloadsamba-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_synclists.c')
-rw-r--r--source3/nmbd/nmbd_synclists.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/source3/nmbd/nmbd_synclists.c b/source3/nmbd/nmbd_synclists.c
index 29462685b0..dea68d4c27 100644
--- a/source3/nmbd/nmbd_synclists.c
+++ b/source3/nmbd/nmbd_synclists.c
@@ -133,14 +133,17 @@ void sync_browse_lists(struct work_record *work,
struct sync_record *s;
static int counter;
+ START_PROFILE(sync_browse_lists);
/* Check we're not trying to sync with ourselves. This can
happen if we are a domain *and* a local master browser. */
if (ismyip(ip)) {
+done:
+ END_PROFILE(sync_browse_lists);
return;
}
s = (struct sync_record *)malloc(sizeof(*s));
- if (!s) return;
+ if (!s) goto done;
ZERO_STRUCTP(s);
@@ -155,7 +158,7 @@ void sync_browse_lists(struct work_record *work,
DLIST_ADD(syncs, s);
/* the parent forks and returns, leaving the child to do the
- actual sync */
+ actual sync and call END_PROFILE*/
CatchChild();
if ((s->pid = sys_fork())) return;
@@ -165,12 +168,16 @@ void sync_browse_lists(struct work_record *work,
work->work_group, name, inet_ntoa(ip)));
fp = sys_fopen(s->fname,"w");
- if (!fp) _exit(1);
+ if (!fp) {
+ END_PROFILE(sync_browse_lists);
+ _exit(1);
+ }
sync_child(name, nm_type, work->work_group, ip, local, servers,
s->fname);
fclose(fp);
+ END_PROFILE(sync_browse_lists);
_exit(0);
}