diff options
author | Uri Simchoni <uri@samba.org> | 2016-03-28 10:11:33 +0300 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2016-03-28 20:45:16 +0200 |
commit | f1c84e49dbd3ba792dbc7386505b03a4545437fb (patch) | |
tree | 935cd4992ff92fcb7d4dc70d2111913e9318939a /source3/profile | |
parent | 644e697fab4af7ccc4143f8d0201cb31c91b8a3f (diff) | |
download | samba-f1c84e49dbd3ba792dbc7386505b03a4545437fb.tar.gz |
s3-profile: reduce dependencies of smbprofile.h
Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/profile')
-rw-r--r-- | source3/profile/profile.c | 12 | ||||
-rw-r--r-- | source3/profile/profile_dummy.c | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/source3/profile/profile.c b/source3/profile/profile.c index 1464a421b4d..833c9c4425d 100644 --- a/source3/profile/profile.c +++ b/source3/profile/profile.c @@ -39,7 +39,7 @@ struct smbprofile_global_state smbprofile_state; /**************************************************************************** Set a profiling level. ****************************************************************************/ -void set_profile_level(int level, struct server_id src) +void set_profile_level(int level, const struct server_id *src) { SMB_ASSERT(smbprofile_state.internal.db != NULL); @@ -48,25 +48,25 @@ void set_profile_level(int level, struct server_id src) smbprofile_state.config.do_count = false; smbprofile_state.config.do_times = false; DEBUG(1,("INFO: Profiling turned OFF from pid %d\n", - (int)procid_to_pid(&src))); + (int)procid_to_pid(src))); break; case 1: /* turn on counter profiling only */ smbprofile_state.config.do_count = true; smbprofile_state.config.do_times = false; DEBUG(1,("INFO: Profiling counts turned ON from pid %d\n", - (int)procid_to_pid(&src))); + (int)procid_to_pid(src))); break; case 2: /* turn on complete profiling */ smbprofile_state.config.do_count = true; smbprofile_state.config.do_times = true; DEBUG(1,("INFO: Full profiling turned ON from pid %d\n", - (int)procid_to_pid(&src))); + (int)procid_to_pid(src))); break; case 3: /* reset profile values */ ZERO_STRUCT(profile_p->values); tdb_wipe_all(smbprofile_state.internal.db->tdb); DEBUG(1,("INFO: Profiling values cleared from pid %d\n", - (int)procid_to_pid(&src))); + (int)procid_to_pid(src))); break; } } @@ -88,7 +88,7 @@ static void profile_message(struct messaging_context *msg_ctx, } memcpy(&level, data->data, sizeof(level)); - set_profile_level(level, src); + set_profile_level(level, &src); } /**************************************************************************** diff --git a/source3/profile/profile_dummy.c b/source3/profile/profile_dummy.c index 1f820ec14b9..7d34d209fce 100644 --- a/source3/profile/profile_dummy.c +++ b/source3/profile/profile_dummy.c @@ -25,7 +25,7 @@ bool profile_setup(struct messaging_context *msg_ctx, bool rdonly) return true; } -void set_profile_level(int level, struct server_id src) +void set_profile_level(int level, const struct server_id *src) { DEBUG(1,("INFO: Profiling support unavailable in this build.\n")); } |