mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-02-08 08:51:50 +00:00
update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10406 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
ff0c6deb89
commit
d66d49ae61
@ -565,9 +565,20 @@ SWITCH_STANDARD_API(event_sink_function)
|
|||||||
|
|
||||||
|
|
||||||
if (!strcasecmp(wcmd, "filter")) {
|
if (!strcasecmp(wcmd, "filter")) {
|
||||||
char *action = switch_event_get_header(stream->param_event, "action");;
|
char *action = switch_event_get_header(stream->param_event, "action");
|
||||||
char *header_name = switch_event_get_header(stream->param_event, "header_name");;
|
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 *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)) {
|
if (switch_strlen_zero(action)) {
|
||||||
stream->write_function(stream, "<data><reply type=\"error\">Invalid Syntax</reply></data>\n");
|
stream->write_function(stream, "<data><reply type=\"error\">Invalid Syntax</reply></data>\n");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user