mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-06-07 21:44:51 +00:00
FS-6615 test this patch
This commit is contained in:
parent
958d9d9b21
commit
3a00260dc6
@ -106,7 +106,6 @@ SWITCH_DECLARE(bool) email(char *to, char *from, char *headers = NULL, char *bod
|
|||||||
|
|
||||||
class API {
|
class API {
|
||||||
protected:
|
protected:
|
||||||
char *last_data;
|
|
||||||
char time_buf[64];
|
char time_buf[64];
|
||||||
switch_core_session_t *session;
|
switch_core_session_t *session;
|
||||||
public:
|
public:
|
||||||
|
@ -40,6 +40,8 @@
|
|||||||
%newobject Event;
|
%newobject Event;
|
||||||
%newobject Stream;
|
%newobject Stream;
|
||||||
%newobject Dbh;
|
%newobject Dbh;
|
||||||
|
%newobject API::execute;
|
||||||
|
%newobject API::executeString;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* tell swig to grok everything defined in these header files and
|
* tell swig to grok everything defined in these header files and
|
||||||
|
@ -1980,6 +1980,7 @@ static int _wrap_API_execute(lua_State* L) {
|
|||||||
result = (char *)(arg1)->execute((char const *)arg2,(char const *)arg3);
|
result = (char *)(arg1)->execute((char const *)arg2,(char const *)arg3);
|
||||||
SWIG_arg=0;
|
SWIG_arg=0;
|
||||||
lua_pushstring(L,(const char*)result); SWIG_arg++;
|
lua_pushstring(L,(const char*)result); SWIG_arg++;
|
||||||
|
free(result);
|
||||||
return SWIG_arg;
|
return SWIG_arg;
|
||||||
|
|
||||||
if(0) SWIG_fail;
|
if(0) SWIG_fail;
|
||||||
@ -2008,6 +2009,7 @@ static int _wrap_API_executeString(lua_State* L) {
|
|||||||
result = (char *)(arg1)->executeString((char const *)arg2);
|
result = (char *)(arg1)->executeString((char const *)arg2);
|
||||||
SWIG_arg=0;
|
SWIG_arg=0;
|
||||||
lua_pushstring(L,(const char*)result); SWIG_arg++;
|
lua_pushstring(L,(const char*)result); SWIG_arg++;
|
||||||
|
free(result);
|
||||||
return SWIG_arg;
|
return SWIG_arg;
|
||||||
|
|
||||||
if(0) SWIG_fail;
|
if(0) SWIG_fail;
|
||||||
|
@ -82,6 +82,8 @@ char * SWIG_csharp_string_callback(const char * str) {
|
|||||||
%newobject CoreSession;
|
%newobject CoreSession;
|
||||||
%newobject Event;
|
%newobject Event;
|
||||||
%newobject Stream;
|
%newobject Stream;
|
||||||
|
%newobject API::execute;
|
||||||
|
%newobject API::executeString;
|
||||||
|
|
||||||
// Allow bitwise compare on flag fields
|
// Allow bitwise compare on flag fields
|
||||||
%typemap(csclassmodifiers) session_flag_t "[System.Flags] public enum"
|
%typemap(csclassmodifiers) session_flag_t "[System.Flags] public enum"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* ----------------------------------------------------------------------------
|
/* ----------------------------------------------------------------------------
|
||||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||||
* Version 2.0.7
|
* Version 2.0.12
|
||||||
*
|
*
|
||||||
* This file is not intended to be easily readable and contains a number of
|
* This file is not intended to be easily readable and contains a number of
|
||||||
* coding conventions designed to improve portability and efficiency. Do not make
|
* coding conventions designed to improve portability and efficiency. Do not make
|
||||||
@ -41996,6 +41996,7 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_Api_Execute(void * jarg1, char * jarg2, cha
|
|||||||
arg3 = (char *)jarg3;
|
arg3 = (char *)jarg3;
|
||||||
result = (char *)(arg1)->execute((char const *)arg2,(char const *)arg3);
|
result = (char *)(arg1)->execute((char const *)arg2,(char const *)arg3);
|
||||||
jresult = SWIG_csharp_string_callback((const char *)result);
|
jresult = SWIG_csharp_string_callback((const char *)result);
|
||||||
|
free(result);
|
||||||
return jresult;
|
return jresult;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -42010,6 +42011,7 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_Api_ExecuteString(void * jarg1, char * jarg
|
|||||||
arg2 = (char *)jarg2;
|
arg2 = (char *)jarg2;
|
||||||
result = (char *)(arg1)->executeString((char const *)arg2);
|
result = (char *)(arg1)->executeString((char const *)arg2);
|
||||||
jresult = SWIG_csharp_string_callback((const char *)result);
|
jresult = SWIG_csharp_string_callback((const char *)result);
|
||||||
|
free(result);
|
||||||
return jresult;
|
return jresult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -15,6 +15,8 @@
|
|||||||
%newobject CoreSession;
|
%newobject CoreSession;
|
||||||
%newobject Event;
|
%newobject Event;
|
||||||
%newobject Stream;
|
%newobject Stream;
|
||||||
|
%newobject API::execute;
|
||||||
|
%newobject API::executeString;
|
||||||
|
|
||||||
/** insert the following includes into generated code so it compiles */
|
/** insert the following includes into generated code so it compiles */
|
||||||
%{
|
%{
|
||||||
|
@ -2679,6 +2679,7 @@ XS(_wrap_API_execute) {
|
|||||||
|
|
||||||
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
|
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
|
||||||
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
|
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
|
||||||
|
free(result);
|
||||||
XSRETURN(argvi);
|
XSRETURN(argvi);
|
||||||
fail:
|
fail:
|
||||||
|
|
||||||
@ -2719,6 +2720,7 @@ XS(_wrap_API_executeString) {
|
|||||||
ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
|
ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
|
||||||
|
|
||||||
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
|
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
|
||||||
|
free(result);
|
||||||
XSRETURN(argvi);
|
XSRETURN(argvi);
|
||||||
fail:
|
fail:
|
||||||
|
|
||||||
|
@ -38,6 +38,8 @@
|
|||||||
%newobject Event;
|
%newobject Event;
|
||||||
%newobject Stream;
|
%newobject Stream;
|
||||||
%newobject Dbh;
|
%newobject Dbh;
|
||||||
|
%newobject API::execute;
|
||||||
|
%newobject API::executeString;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* tell swig to grok everything defined in these header files and
|
* tell swig to grok everything defined in these header files and
|
||||||
|
@ -1980,6 +1980,7 @@ static int _wrap_API_execute(lua_State* L) {
|
|||||||
result = (char *)(arg1)->execute((char const *)arg2,(char const *)arg3);
|
result = (char *)(arg1)->execute((char const *)arg2,(char const *)arg3);
|
||||||
SWIG_arg=0;
|
SWIG_arg=0;
|
||||||
lua_pushstring(L,(const char*)result); SWIG_arg++;
|
lua_pushstring(L,(const char*)result); SWIG_arg++;
|
||||||
|
free(result);
|
||||||
return SWIG_arg;
|
return SWIG_arg;
|
||||||
|
|
||||||
if(0) SWIG_fail;
|
if(0) SWIG_fail;
|
||||||
@ -2008,6 +2009,7 @@ static int _wrap_API_executeString(lua_State* L) {
|
|||||||
result = (char *)(arg1)->executeString((char const *)arg2);
|
result = (char *)(arg1)->executeString((char const *)arg2);
|
||||||
SWIG_arg=0;
|
SWIG_arg=0;
|
||||||
lua_pushstring(L,(const char*)result); SWIG_arg++;
|
lua_pushstring(L,(const char*)result); SWIG_arg++;
|
||||||
|
free(result);
|
||||||
return SWIG_arg;
|
return SWIG_arg;
|
||||||
|
|
||||||
if(0) SWIG_fail;
|
if(0) SWIG_fail;
|
||||||
|
@ -222,12 +222,11 @@ SWITCH_DECLARE_CONSTRUCTOR API::API(CoreSession *s)
|
|||||||
} else {
|
} else {
|
||||||
session = NULL;
|
session = NULL;
|
||||||
}
|
}
|
||||||
last_data = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SWITCH_DECLARE_CONSTRUCTOR API::~API()
|
SWITCH_DECLARE_CONSTRUCTOR API::~API()
|
||||||
{
|
{
|
||||||
switch_safe_free(last_data);
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -237,9 +236,7 @@ SWITCH_DECLARE(const char *) API::execute(const char *cmd, const char *arg)
|
|||||||
this_check("");
|
this_check("");
|
||||||
SWITCH_STANDARD_STREAM(stream);
|
SWITCH_STANDARD_STREAM(stream);
|
||||||
switch_api_execute(cmd, arg, session, &stream);
|
switch_api_execute(cmd, arg, session, &stream);
|
||||||
switch_safe_free(last_data);
|
return (char *) stream.data;
|
||||||
last_data = (char *) stream.data;
|
|
||||||
return last_data;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -269,13 +266,10 @@ SWITCH_DECLARE(const char *) API::executeString(const char *cmd)
|
|||||||
*arg++ = '\0';
|
*arg++ = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
switch_safe_free(last_data);
|
|
||||||
|
|
||||||
SWITCH_STANDARD_STREAM(stream);
|
SWITCH_STANDARD_STREAM(stream);
|
||||||
switch_api_execute(mycmd, arg, session, &stream);
|
switch_api_execute(mycmd, arg, session, &stream);
|
||||||
last_data = (char *) stream.data;
|
|
||||||
switch_safe_free(mycmd);
|
switch_safe_free(mycmd);
|
||||||
return last_data;
|
return (char *) stream.data;
|
||||||
}
|
}
|
||||||
|
|
||||||
SWITCH_DECLARE_CONSTRUCTOR Event::Event(const char *type, const char *subclass_name)
|
SWITCH_DECLARE_CONSTRUCTOR Event::Event(const char *type, const char *subclass_name)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user