mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 01:26:58 +00:00
change api to return event on filter command
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12488 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -189,9 +189,18 @@ ESLevent *ESLconnection::recvEventTimed(int ms)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int ESLconnection::filter(const char *header, const char *value)
|
||||
ESLevent *ESLconnection::filter(const char *header, const char *value)
|
||||
{
|
||||
return esl_filter(&handle, header, value);
|
||||
esl_status_t status = esl_filter(&handle, header, value);
|
||||
|
||||
if (status == ESL_SUCCESS && handle.last_sr_event) {
|
||||
esl_event_t *event;
|
||||
esl_event_dup(&event, handle.last_sr_event);
|
||||
return new ESLevent(event, 1);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
int ESLconnection::events(const char *etype, const char *value)
|
||||
|
@@ -86,7 +86,7 @@ class ESLconnection {
|
||||
int sendEvent(ESLevent *send_me);
|
||||
ESLevent *recvEvent();
|
||||
ESLevent *recvEventTimed(int ms);
|
||||
int filter(const char *header, const char *value);
|
||||
ESLevent *filter(const char *header, const char *value);
|
||||
int events(const char *etype, const char *value);
|
||||
int execute(const char *app, const char *arg = NULL, const char *uuid = NULL);
|
||||
int setBlockingExecute(const char *val);
|
||||
|
Reference in New Issue
Block a user