[Freeswitch-branches] [commit] r11359 - freeswitch/branches/1.0/src/mod/event_handlers/mod_event_socket
FreeSWITCH SVN
mikej at freeswitch.org
Thu Jan 22 09:45:23 PST 2009
Author: mikej
Date: Thu Jan 22 11:45:22 2009
New Revision: 11359
Log:
mod_event_socket: add ability to use a comma sep list of events on event-sink create-listener (r:11056)
Modified:
freeswitch/branches/1.0/src/mod/event_handlers/mod_event_socket/mod_event_socket.c
Modified: freeswitch/branches/1.0/src/mod/event_handlers/mod_event_socket/mod_event_socket.c
==============================================================================
--- freeswitch/branches/1.0/src/mod/event_handlers/mod_event_socket/mod_event_socket.c (original)
+++ freeswitch/branches/1.0/src/mod/event_handlers/mod_event_socket/mod_event_socket.c Thu Jan 22 11:45:22 2009
@@ -719,6 +719,7 @@
listener->last_flush = switch_timestamp(NULL);
if (events) {
+ char delim = ',';
if (switch_stristr("xml", format)) {
listener->format = EVENT_FORMAT_XML;
@@ -727,11 +728,15 @@
}
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';
}
More information about the Freeswitch-branches
mailing list