diff options
author | Gerald Carter <jerry@samba.org> | 2005-09-30 17:13:37 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:04:48 -0500 |
commit | 54abd2aa66069e6baf7769c496f46d9dba18db39 (patch) | |
tree | 9cf8e88168011797319ba9e9866749201b1eac1e /source3/lib/debug.c | |
parent | 4a2cc231d22a82ed21771a72508f15d21ed63227 (diff) | |
download | samba-54abd2aa66069e6baf7769c496f46d9dba18db39.tar.gz samba-54abd2aa66069e6baf7769c496f46d9dba18db39.tar.xz samba-54abd2aa66069e6baf7769c496f46d9dba18db39.zip |
r10656: BIG merge from trunk. Features not copied over
* \PIPE\unixinfo
* winbindd's {group,alias}membership new functions
* winbindd's lookupsids() functionality
* swat (trunk changes to be reverted as per discussion with Deryck)
(This used to be commit 939c3cb5d78e3a2236209b296aa8aba8bdce32d3)
Diffstat (limited to 'source3/lib/debug.c')
-rw-r--r-- | source3/lib/debug.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/source3/lib/debug.c b/source3/lib/debug.c index f877d540fb4..f3676070dcb 100644 --- a/source3/lib/debug.c +++ b/source3/lib/debug.c @@ -448,19 +448,22 @@ BOOL debug_parse_levels(const char *params_str) Receive a "set debug level" message. ****************************************************************************/ -static void debug_message(int msg_type, pid_t src, void *buf, size_t len) +static void debug_message(int msg_type, struct process_id src, + void *buf, size_t len) { const char *params_str = buf; /* Check, it's a proper string! */ if (params_str[len-1] != '\0') { DEBUG(1, ("Invalid debug message from pid %u to pid %u\n", - (unsigned int)src, (unsigned int)getpid())); + (unsigned int)procid_to_pid(&src), + (unsigned int)getpid())); return; } DEBUG(3, ("INFO: Remote set of debug to `%s' (pid %u from pid %u)\n", - params_str, (unsigned int)getpid(), (unsigned int)src)); + params_str, (unsigned int)getpid(), + (unsigned int)procid_to_pid(&src))); debug_parse_levels(params_str); } @@ -473,7 +476,8 @@ void debug_message_send(pid_t pid, const char *params_str) { if (!params_str) return; - message_send_pid(pid, MSG_DEBUG, params_str, strlen(params_str) + 1, + message_send_pid(pid_to_procid(pid), MSG_DEBUG, + params_str, strlen(params_str) + 1, False); } @@ -481,11 +485,13 @@ void debug_message_send(pid_t pid, const char *params_str) Return current debug level. ****************************************************************************/ -static void debuglevel_message(int msg_type, pid_t src, void *buf, size_t len) +static void debuglevel_message(int msg_type, struct process_id src, + void *buf, size_t len) { char *message = debug_list_class_names_and_levels(); - DEBUG(1,("INFO: Received REQ_DEBUGLEVEL message from PID %u\n",(unsigned int)src)); + DEBUG(1,("INFO: Received REQ_DEBUGLEVEL message from PID %u\n", + (unsigned int)procid_to_pid(&src))); message_send_pid(src, MSG_DEBUGLEVEL, message, strlen(message) + 1, True); SAFE_FREE(message); |