mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-29 06:34:19 +00:00
change execute and executeAsync to return the last event instead of status since it will almost always be 0
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15973 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
9d348910ef
commit
c13c187a3a
15 files changed
+124
-106
No files matched your search
@@ -148,13 +148,19 @@ int ESLconnection::setEventLock(const char *val)
|
||||
return handle.event_lock;
|
||||
}
|
||||
|
||||
int ESLconnection::execute(const char *app, const char *arg, const char *uuid)
|
||||
ESLevent *ESLconnection::execute(const char *app, const char *arg, const char *uuid)
|
||||
{
|
||||
return esl_execute(&handle, app, arg, uuid);
|
||||
if (esl_execute(&handle, app, arg, uuid) == ESL_SUCCESS) {
|
||||
esl_event_t *event;
|
||||
esl_event_dup(&event, handle.last_sr_event);
|
||||
return new ESLevent(event, 1);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
int ESLconnection::executeAsync(const char *app, const char *arg, const char *uuid)
|
||||
ESLevent *ESLconnection::executeAsync(const char *app, const char *arg, const char *uuid)
|
||||
{
|
||||
int async = handle.async_execute;
|
||||
int r;
|
||||
@@ -163,7 +169,13 @@ int ESLconnection::executeAsync(const char *app, const char *arg, const char *uu
|
||||
r = esl_execute(&handle, app, arg, uuid);
|
||||
handle.async_execute = async;
|
||||
|
||||
return r;
|
||||
if (r == ESL_SUCCESS) {
|
||||
esl_event_t *event;
|
||||
esl_event_dup(&event, handle.last_sr_event);
|
||||
return new ESLevent(event, 1);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int ESLconnection::sendEvent(ESLevent *send_me)
|
||||
|
||||
Reference in new issue
Block a user