[Freeswitch-svn] [commit] r10406 - freeswitch/trunk/src/mod/event_handlers/mod_event_socket
FreeSWITCH SVN
anthm at freeswitch.org
Fri Nov 14 10:11:55 PST 2008
Author: anthm
Date: Fri Nov 14 13:11:54 2008
New Revision: 10406
Log:
update
Modified:
freeswitch/trunk/src/mod/event_handlers/mod_event_socket/mod_event_socket.c
Modified: freeswitch/trunk/src/mod/event_handlers/mod_event_socket/mod_event_socket.c
==============================================================================
--- freeswitch/trunk/src/mod/event_handlers/mod_event_socket/mod_event_socket.c (original)
+++ freeswitch/trunk/src/mod/event_handlers/mod_event_socket/mod_event_socket.c Fri Nov 14 13:11:54 2008
@@ -565,10 +565,21 @@
if (!strcasecmp(wcmd, "filter")) {
- char *action = switch_event_get_header(stream->param_event, "action");;
- char *header_name = switch_event_get_header(stream->param_event, "header_name");;
- char *header_val = switch_event_get_header(stream->param_event, "header_val");;
-
+ char *action = switch_event_get_header(stream->param_event, "action");
+ char *header_name = switch_event_get_header(stream->param_event, "header-name");
+ char *header_val = switch_event_get_header(stream->param_event, "header-val");
+ char *id = switch_event_get_header(stream->param_event, "listen-id");
+ uint32_t idl = 0;
+
+ if (id) {
+ idl = (uint32_t) atol(id);
+ }
+
+ if (!(listener = find_listener(idl))) {
+ stream->write_function(stream, "<data><reply type=\"error\">Invalid Listen-ID</reply></data>\n");
+ goto end;
+ }
+
if (switch_strlen_zero(action)) {
stream->write_function(stream, "<data><reply type=\"error\">Invalid Syntax</reply></data>\n");
goto end;
More information about the Freeswitch-svn
mailing list