mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-24 05:02:10 +00:00
fix esl sendevent issue and change the sendEvent method to return the reply text like sendRecv etc
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16921 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -186,9 +186,18 @@ ESLevent *ESLconnection::executeAsync(const char *app, const char *arg, const ch
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int ESLconnection::sendEvent(ESLevent *send_me)
|
||||
ESLevent *ESLconnection::sendEvent(ESLevent *send_me)
|
||||
{
|
||||
return esl_sendevent(&handle, send_me->event);
|
||||
if (esl_sendevent(&handle, send_me->event) == ESL_SUCCESS) {
|
||||
esl_event_t *e = handle.last_ievent ? handle.last_ievent : handle.last_event;
|
||||
if (e) {
|
||||
esl_event_t *event;
|
||||
esl_event_dup(&event, e);
|
||||
return new ESLevent(event, 1);
|
||||
}
|
||||
}
|
||||
|
||||
return new ESLevent("server_disconnected");
|
||||
}
|
||||
|
||||
ESLevent *ESLconnection::recvEvent()
|
||||
|
||||
Reference in New Issue
Block a user