From cd44e9e72e438c1d8309166e4e917652c4a553a5 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Fri, 2 Jan 2009 17:39:31 +0000 Subject: [PATCH] tweak git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11056 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- .../event_handlers/mod_event_socket/mod_event_socket.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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 fb55cae4c8..7a5ec1c20d 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 @@ -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'; }