From 858cc7fa19304af416ae632b4132889110420fb6 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Thu, 19 Oct 2006 18:52:46 +0000 Subject: [PATCH] present from pdt git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3110 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- .../mod_event_socket/mod_event_socket.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/mod/event_handlers/mod_event_socket/mod_event_socket.c b/src/mod/event_handlers/mod_event_socket/mod_event_socket.c index 5b555489b6..03e1bca2be 100644 --- a/src/mod/event_handlers/mod_event_socket/mod_event_socket.c +++ b/src/mod/event_handlers/mod_event_socket/mod_event_socket.c @@ -593,10 +593,20 @@ static switch_status_t parse_command(listener_t *listener, switch_event_t *event } else if (!strncasecmp(cmd, "log", 3)) { char *level_s; + + //pull off the first newline/carriage return strip_cr(cmd); - level_s = cmd + 4; + //move past the command + level_s = cmd + 3; + //see if we got an argument + if(!switch_strlen_zero(level_s)) { + //if so move to the argument + level_s++; + } + + //see if we lined up on an argument or not if (switch_strlen_zero(level_s)) { level_s = "debug"; }