From c97023b14c942f7261808159a0d192926239b704 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 10 Nov 2000 22:07:57 +0000 Subject: Merge in Herb's changes from 2.2. Jeremy. (This used to be commit 24d76c5fbda29d89c96d7c22193ec2eb93ad3887) --- source3/lib/debug.c | 2 +- source3/profile/profile.c | 5 ++++- source3/utils/smbcontrol.c | 16 ++++++++++++++-- 3 files changed, 19 insertions(+), 4 deletions(-) (limited to 'source3') diff --git a/source3/lib/debug.c b/source3/lib/debug.c index 1a53f4c2a82..cdcd44955b4 100644 --- a/source3/lib/debug.c +++ b/source3/lib/debug.c @@ -127,7 +127,7 @@ void debug_message(int msg_type, pid_t src, void *buf, size_t len) int level; memcpy(&level, buf, sizeof(int)); DEBUGLEVEL = level; - DEBUG(1,("Debug level set to %d from pid %d\n", level, (int)src)); + DEBUG(1,("INFO: Debug level set to %d from pid %d\n", level, (int)src)); } /**************************************************************************** diff --git a/source3/profile/profile.c b/source3/profile/profile.c index c639f17ce50..f1d2310ce18 100644 --- a/source3/profile/profile.c +++ b/source3/profile/profile.c @@ -54,20 +54,23 @@ void profile_message(int msg_type, pid_t src, void *buf, size_t len) case 0: /* turn off profiling */ do_profile_flag = False; do_profile_times = False; + DEBUG(1,("INFO: Profiling turned OFF from pid %d\n", (int)src)); break; case 1: /* turn on counter profiling only */ do_profile_flag = True; do_profile_times = False; + DEBUG(1,("INFO: Profiling counts turned ON from pid %d\n", (int)src)); break; case 2: /* turn on complete profiling */ do_profile_flag = True; do_profile_times = True; + DEBUG(1,("INFO: Full profiling turned ON from pid %d\n", (int)src)); break; case 3: /* reset profile values */ memset((char *)profile_p, 0, sizeof(*profile_p)); + DEBUG(1,("INFO: Profiling values cleared from pid %d\n", (int)src)); break; } - DEBUG(1,("Profile level set to %d from pid %d\n", level, (int)src)); } /******************************************************************* diff --git a/source3/utils/smbcontrol.c b/source3/utils/smbcontrol.c index 57f6149bcdd..c059ccb6ec8 100644 --- a/source3/utils/smbcontrol.c +++ b/source3/utils/smbcontrol.c @@ -19,8 +19,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#define NO_SYSLOG - #include "includes.h" static struct { @@ -32,6 +30,7 @@ static struct { {"ping", MSG_PING}, {"profile", MSG_PROFILE}, {"debuglevel", MSG_REQ_DEBUGLEVEL}, + {"printer-notify", MSG_PRINTER_NOTIFY}, {NULL, -1} }; @@ -196,6 +195,19 @@ static BOOL do_command(char *dest, char *msg_name, char *params) } break; + case MSG_PRINTER_NOTIFY: + if (!strequal(dest, "smbd")) { + fprintf(stderr,"printer-notify can only be sent to smbd\n"); + return(False); + } + if (!params) { + fprintf(stderr, "printer-notify needs a printer name\n"); + return (False); + } + retval = send_message(dest, MSG_PRINTER_NOTIFY, params, + strlen(params) + 1); + break; + case MSG_PING: if (!pong_registered) { message_register(MSG_PONG, pong_function); -- cgit