fix lua originate
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9297 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
23c0d9ebbf
commit
12f01067c5
|
@ -59,10 +59,15 @@ void Session::setLUA(lua_State * state)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Session::originate(CoreSession *a_leg_session, char *dest, int timeout)
|
int Session::originate(CoreSession *a_leg_session, char *dest, int timeout)
|
||||||
{
|
{
|
||||||
CoreSession::originate(a_leg_session, dest, timeout);
|
int x = CoreSession::originate(a_leg_session, dest, timeout);
|
||||||
setLUA(L);
|
|
||||||
|
if (x) {
|
||||||
|
setLUA(L);
|
||||||
|
}
|
||||||
|
|
||||||
|
return x;
|
||||||
}
|
}
|
||||||
|
|
||||||
lua_State *Session::getLUA()
|
lua_State *Session::getLUA()
|
||||||
|
|
|
@ -33,7 +33,7 @@ class Session : public CoreSession {
|
||||||
void setInputCallback(char *cbfunc, char *funcargs = NULL);
|
void setInputCallback(char *cbfunc, char *funcargs = NULL);
|
||||||
void setHangupHook(char *func, char *arg = NULL);
|
void setHangupHook(char *func, char *arg = NULL);
|
||||||
bool ready();
|
bool ready();
|
||||||
void originate(CoreSession *a_leg_session, char *dest, int timeout);
|
int originate(CoreSession *a_leg_session, char *dest, int timeout);
|
||||||
|
|
||||||
char *cb_function;
|
char *cb_function;
|
||||||
char *cb_arg;
|
char *cb_arg;
|
||||||
|
|
|
@ -7438,6 +7438,7 @@ static int _wrap_Session_originate(lua_State* L) {
|
||||||
CoreSession *arg2 = (CoreSession *) 0 ;
|
CoreSession *arg2 = (CoreSession *) 0 ;
|
||||||
char *arg3 = (char *) 0 ;
|
char *arg3 = (char *) 0 ;
|
||||||
int arg4 ;
|
int arg4 ;
|
||||||
|
int result;
|
||||||
|
|
||||||
SWIG_check_num_args("originate",4,4)
|
SWIG_check_num_args("originate",4,4)
|
||||||
if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("originate",1,"LUA::Session *");
|
if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("originate",1,"LUA::Session *");
|
||||||
|
@ -7456,9 +7457,9 @@ static int _wrap_Session_originate(lua_State* L) {
|
||||||
|
|
||||||
arg3 = (char *)lua_tostring(L, 3);
|
arg3 = (char *)lua_tostring(L, 3);
|
||||||
arg4 = (int)lua_tonumber(L, 4);
|
arg4 = (int)lua_tonumber(L, 4);
|
||||||
(arg1)->originate(arg2,arg3,arg4);
|
result = (int)(arg1)->originate(arg2,arg3,arg4);
|
||||||
SWIG_arg=0;
|
SWIG_arg=0;
|
||||||
|
lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
|
||||||
return SWIG_arg;
|
return SWIG_arg;
|
||||||
|
|
||||||
if(0) SWIG_fail;
|
if(0) SWIG_fail;
|
||||||
|
|
Loading…
Reference in New Issue