]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
present from pdt
authorAnthony Minessale <anthony.minessale@gmail.com>
Thu, 19 Oct 2006 18:52:46 +0000 (18:52 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Thu, 19 Oct 2006 18:52:46 +0000 (18:52 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3110 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/event_handlers/mod_event_socket/mod_event_socket.c

index 5b555489b6de756d38a965f5eea46b0d75bd4414..03e1bca2be7d404f3760d1a27b5af612b1b1c4ad 100644 (file)
@@ -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";
                }