From 75287280717bc1f1411d2084d3295fffb1ccb391 Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Wed, 5 Sep 2001 18:43:55 +0000 Subject: merge profile data changes from 2.2 (This used to be commit c105859304e93297fa29f346e9cbd1af0c95048b) --- source3/nmbd/nmbd_synclists.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'source3/nmbd/nmbd_synclists.c') 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); } -- cgit