Merge in Herb's changes from 2.2.
authorJeremy Allison <jra@samba.org>
Fri, 10 Nov 2000 22:07:57 +0000 (22:07 +0000)
committerJeremy Allison <jra@samba.org>
Fri, 10 Nov 2000 22:07:57 +0000 (22:07 +0000)
Jeremy.
(This used to be commit 24d76c5fbda29d89c96d7c22193ec2eb93ad3887)

source3/lib/debug.c
source3/profile/profile.c
source3/utils/smbcontrol.c

index 1a53f4c2a82e42deaa05b2b2a6a16e085ace4d6b..cdcd44955b492ab4ffe9b3a1f009eff65f3d2c7b 100644 (file)
@@ -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));
 }
 
 /****************************************************************************
index c639f17ce5024ae2fc80eddb6288e4aff79c6957..f1d2310ce18a09f547d5fd8abecc33ba868c61a1 100644 (file)
@@ -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));
 }
 
 /*******************************************************************
index 57f6149bcdd8df753a7ad60259813d34de02ac3a..c059ccb6ec84d41d90b0942b58f3c791d7edafd0 100644 (file)
@@ -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);