fix get_variable

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5156 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2007-05-11 18:39:19 +00:00
parent f00642d7ab
commit 48d87f00d6
3 changed files with 8 additions and 8 deletions

View File

@ -51,10 +51,10 @@ void SessionContainer::set_variable(char *var, char *val)
switch_channel_set_variable(channel, var, val); switch_channel_set_variable(channel, var, val);
} }
void SessionContainer::get_variable(char *var, char *val) char *SessionContainer::get_variable(char *var)
{ {
sanity_check(); sanity_check(NULL);
switch_channel_get_variable(channel, var); return switch_channel_get_variable(channel, var);
} }
void SessionContainer::execute(char *app, char *data) void SessionContainer::execute(char *app, char *data)

View File

@ -34,7 +34,7 @@ class SessionContainer {
int pre_answer(); int pre_answer();
void hangup(char *cause); void hangup(char *cause);
void set_variable(char *var, char *val); void set_variable(char *var, char *val);
void get_variable(char *var, char *val); char *get_variable(char *var);
int play_file(char *file, char *timer_name); int play_file(char *file, char *timer_name);
void set_dtmf_callback(PyObject * pyfunc); void set_dtmf_callback(PyObject * pyfunc);
int speak_text(char *text); int speak_text(char *text);

View File

@ -1045,14 +1045,14 @@ static PyObject *_wrap_SessionContainer_get_variable(PyObject *self, PyObject *a
PyObject *resultobj; PyObject *resultobj;
SessionContainer *arg1 = (SessionContainer *) 0 ; SessionContainer *arg1 = (SessionContainer *) 0 ;
char *arg2 ; char *arg2 ;
char *arg3 ; char *result;
PyObject * obj0 = 0 ; PyObject * obj0 = 0 ;
if(!PyArg_ParseTuple(args,(char *)"Oss:SessionContainer_get_variable",&obj0,&arg2,&arg3)) goto fail; if(!PyArg_ParseTuple(args,(char *)"Os:SessionContainer_get_variable",&obj0,&arg2)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_SessionContainer,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_SessionContainer,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
(arg1)->get_variable(arg2,arg3); result = (char *)(arg1)->get_variable(arg2);
Py_INCREF(Py_None); resultobj = Py_None; resultobj = result ? PyString_FromString(result) : Py_BuildValue((char*)"");
return resultobj; return resultobj;
fail: fail:
return NULL; return NULL;