diff options
author | Herb Lewis <herb@samba.org> | 2007-04-20 01:52:44 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:19:32 -0500 |
commit | f8f51e8648224af6645dbd0c2f2bffc678b83dac (patch) | |
tree | 24a7493c64e2afeaf64aa287f2c246fd2180805a /source/profile | |
parent | e718606295f4d686767d1583fd5e774dd66b8b86 (diff) | |
download | samba-f8f51e8648224af6645dbd0c2f2bffc678b83dac.tar.gz samba-f8f51e8648224af6645dbd0c2f2bffc678b83dac.tar.xz samba-f8f51e8648224af6645dbd0c2f2bffc678b83dac.zip |
r22395: allow profiling level to be set on startup
Diffstat (limited to 'source/profile')
-rw-r--r-- | source/profile/profile.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/source/profile/profile.c b/source/profile/profile.c index 686d130b567..b7a2ea23beb 100644 --- a/source/profile/profile.c +++ b/source/profile/profile.c @@ -42,14 +42,10 @@ BOOL do_profile_flag = False; BOOL do_profile_times = False; /**************************************************************************** -receive a set profile level message +Set a profiling level. ****************************************************************************/ -void profile_message(int msg_type, struct process_id src, - void *buf, size_t len, void *private_data) +void set_profile_level(int level, struct process_id src) { - int level; - - memcpy(&level, buf, sizeof(int)); #ifdef WITH_PROFILE switch (level) { case 0: /* turn off profiling */ @@ -95,6 +91,17 @@ void profile_message(int msg_type, struct process_id src, } /**************************************************************************** +receive a set profile level message +****************************************************************************/ +void profile_message(int msg_type, struct process_id src, void *buf, size_t len, void *private_data) +{ + int level; + + memcpy(&level, buf, sizeof(int)); + set_profile_level(level, src); +} + +/**************************************************************************** receive a request profile level message ****************************************************************************/ void reqprofile_message(int msg_type, struct process_id src, |