]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
tweak
authorAnthony Minessale <anthony.minessale@gmail.com>
Fri, 2 Jan 2009 17:39:31 +0000 (17:39 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Fri, 2 Jan 2009 17:39:31 +0000 (17:39 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11056 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/event_handlers/mod_event_socket/mod_event_socket.c

index fb55cae4c89af89d00d1071e0d3e9be2b47446ae..7a5ec1c20d2dddfc082f69943fb53a8b225b1573 100644 (file)
@@ -719,6 +719,7 @@ SWITCH_STANDARD_API(event_sink_function)
                listener->last_flush = switch_timestamp(NULL);
                
                if (events) {
+                       char delim = ',';
 
                        if (switch_stristr("xml", format)) {
                                listener->format = EVENT_FORMAT_XML;
@@ -727,11 +728,15 @@ SWITCH_STANDARD_API(event_sink_function)
                        }
                        
                        edup = strdup(events);
-                       
+
+                       if (strchr(edup, ' ')) {
+                               delim = ' ';
+                       }
+
                        for (cur = edup; cur; count++) {
                                switch_event_types_t type;
                                
-                               if ((next = strchr(cur, ' '))) {
+                               if ((next = strchr(cur, delim))) {
                                        *next++ = '\0';
                                }