mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
Merge in Herb's changes from 2.2.
Jeremy.
This commit is contained in:
parent
f25b5798b8
commit
24d76c5fbd
@ -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));
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -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));
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user