1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00

lib/messages.c add debug print for receipt of PING and

REQ_DEBUGLEVEL messages
utils/smbcontrol.c      allow "q" to exit interactive mode. Exit on error
                        from message_init.
This commit is contained in:
Herb Lewis 0001-01-01 00:00:00 +00:00
parent cae5eeb16e
commit cda8c04391
2 changed files with 4 additions and 1 deletions

View File

@ -70,6 +70,7 @@ a useful function for testing the message system
****************************************************************************/
void ping_message(int msg_type, pid_t src, void *buf, size_t len)
{
DEBUG(1,("INFO: Received PING message from PID %d\n",src));
message_send_pid(src, MSG_PONG, buf, len);
}
@ -80,6 +81,7 @@ void debuglevel_message(int msg_type, pid_t src, void *buf, size_t len)
{
int level;
DEBUG(1,("INFO: Received REQ_DEBUGLEVEL message from PID %d\n",src));
level = DEBUGLEVEL;
message_send_pid(src, MSG_DEBUGLEVEL, &level, sizeof(int));
}

View File

@ -242,7 +242,7 @@ static BOOL do_command(char *dest, char *msg_name, char *params)
charset_initialise();
lp_load(servicesf,False,False,False);
message_init();
if (!message_init()) exit(1);
if (argc < 2) usage(True);
@ -277,6 +277,7 @@ static BOOL do_command(char *dest, char *msg_name, char *params)
myargc++;
}
if (!myargc) break;
if (strequal(myargv[0],"q")) break;
if (myargc < 2)
usage(False);
else if (!do_command(myargv[0],myargv[1],myargc > 2 ? myargv[2] : 0))