summaryrefslogtreecommitdiff
path: root/source3/profile
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2015-11-06 14:55:35 +0100
committerVolker Lendecke <vl@samba.org>2015-11-16 14:51:33 +0100
commitb4b4fd0ba0f838cc30d7c331dae33335015096f7 (patch)
treedc7e9af37c03722c8e0fd7bceea728c1fb237414 /source3/profile
parente3e0a295c3fc25391260a8bb7d7d29137f7129fa (diff)
downloadsamba-b4b4fd0ba0f838cc30d7c331dae33335015096f7.tar.gz
smbprofile: Add dst pid to smbprofile_cleanup
The consolidation will soon be done by a separate process. We need to avoid the getpid() call in smbprofile_cleanup(). Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
Diffstat (limited to 'source3/profile')
-rw-r--r--source3/profile/profile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/profile/profile.c b/source3/profile/profile.c
index 00cb3e550c4..1464a421b4d 100644
--- a/source3/profile/profile.c
+++ b/source3/profile/profile.c
@@ -312,7 +312,7 @@ void smbprofile_dump(void)
return;
}
-void smbprofile_cleanup(pid_t pid)
+void smbprofile_cleanup(pid_t pid, pid_t dst)
{
TDB_DATA key = { .dptr = (uint8_t *)&pid, .dsize = sizeof(pid) };
struct profile_stats s = {};
@@ -336,7 +336,7 @@ void smbprofile_cleanup(pid_t pid)
tdb_delete(smbprofile_state.internal.db->tdb, key);
tdb_chainunlock(smbprofile_state.internal.db->tdb, key);
- pid = getpid();
+ pid = dst;
ret = tdb_chainlock(smbprofile_state.internal.db->tdb, key);
if (ret != 0) {
return;