]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FSCORE-282
authorAnthony Minessale <anthony.minessale@gmail.com>
Fri, 30 Jan 2009 23:19:38 +0000 (23:19 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Fri, 30 Jan 2009 23:19:38 +0000 (23:19 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11570 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/include/switch_cpp.h
src/mod/languages/mod_java/switch_swig_wrap.cpp
src/mod/languages/mod_lua/mod_lua_wrap.cpp
src/mod/languages/mod_managed/freeswitch_wrap.cxx
src/mod/languages/mod_perl/mod_perl_wrap.cpp
src/mod/languages/mod_python/mod_python_wrap.cpp
src/switch_cpp.cpp

index 701f042b22da599fa3d0d457c605abc131e500b8..9f4ef37eaf3307dc3632acd837d5c0e7674f3384 100644 (file)
@@ -337,7 +337,7 @@ SWITCH_DECLARE(void) consoleCleanLog(char *msg);
 
                 SWITCH_DECLARE(void) waitForAnswer(CoreSession *calling_session);
 
-                SWITCH_DECLARE(void) execute(char *app, char *data = NULL);
+                SWITCH_DECLARE(void) execute(const char *app, const char *data = NULL);
 
                 SWITCH_DECLARE(void) sendEvent(Event * sendME);
 
index fd088d0fe056ce6ade0f7b5fe32b485a61ec7b52..969cec18b98baa6910794fe9cff72a4bdab5281a 100644 (file)
@@ -2906,7 +2906,7 @@ SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1exec
     arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
     if (!arg3) return ;
   }
-  (arg1)->execute(arg2,arg3);
+  (arg1)->execute((char const *)arg2,(char const *)arg3);
   if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
   if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
 }
@@ -2925,7 +2925,7 @@ SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1exec
     arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
     if (!arg2) return ;
   }
-  (arg1)->execute(arg2);
+  (arg1)->execute((char const *)arg2);
   if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
 }
 
index b39a22c9b259dc14bf8fbb4f899f228eeedbf988..2f1c4bd52fdb696016a684c0308196b28da2eeee 100644 (file)
@@ -6589,8 +6589,8 @@ static int _wrap_CoreSession_execute__SWIG_0(lua_State* L) {
   
   SWIG_check_num_args("execute",3,3)
   if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("execute",1,"CoreSession *");
-  if(!lua_isstring(L,2)) SWIG_fail_arg("execute",2,"char *");
-  if(!lua_isstring(L,3)) SWIG_fail_arg("execute",3,"char *");
+  if(!lua_isstring(L,2)) SWIG_fail_arg("execute",2,"char const *");
+  if(!lua_isstring(L,3)) SWIG_fail_arg("execute",3,"char const *");
   
   if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){
     SWIG_fail_ptr("CoreSession_execute",1,SWIGTYPE_p_CoreSession);
@@ -6598,7 +6598,7 @@ static int _wrap_CoreSession_execute__SWIG_0(lua_State* L) {
   
   arg2 = (char *)lua_tostring(L, 2);
   arg3 = (char *)lua_tostring(L, 3);
-  (arg1)->execute(arg2,arg3);
+  (arg1)->execute((char const *)arg2,(char const *)arg3);
   SWIG_arg=0;
   
   return SWIG_arg;
@@ -6618,14 +6618,14 @@ static int _wrap_CoreSession_execute__SWIG_1(lua_State* L) {
   
   SWIG_check_num_args("execute",2,2)
   if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("execute",1,"CoreSession *");
-  if(!lua_isstring(L,2)) SWIG_fail_arg("execute",2,"char *");
+  if(!lua_isstring(L,2)) SWIG_fail_arg("execute",2,"char const *");
   
   if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){
     SWIG_fail_ptr("CoreSession_execute",1,SWIGTYPE_p_CoreSession);
   }
   
   arg2 = (char *)lua_tostring(L, 2);
-  (arg1)->execute(arg2);
+  (arg1)->execute((char const *)arg2);
   SWIG_arg=0;
   
   return SWIG_arg;
index 8cd9e5f0b4ada8a8a2dd536d2c83a465cfebd3cd..09bfb701006f778a6c963f0fa256a2b0b2917413 100644 (file)
@@ -21517,7 +21517,7 @@ SWIGEXPORT unsigned long SWIGSTDCALL CSharp_switch_ivr_schedule_broadcast(void *
   arg2 = (char *)jarg2; 
   arg3 = (char *)jarg3; 
   arg4 = (switch_media_flag_t)jarg4; 
-  result = (uint32_t)switch_ivr_schedule_broadcast(arg1,arg2,arg3,arg4);
+  result = (uint32_t)switch_ivr_schedule_broadcast(arg1,(char const *)arg2,(char const *)arg3,arg4);
   jresult = (unsigned long)result; 
   return jresult;
 }
@@ -27643,7 +27643,7 @@ SWIGEXPORT void SWIGSTDCALL CSharp_CoreSession_Execute(void * jarg1, char * jarg
   arg1 = (CoreSession *)jarg1; 
   arg2 = (char *)jarg2; 
   arg3 = (char *)jarg3; 
-  (arg1)->execute(arg2,arg3);
+  (arg1)->execute((char const *)arg2,(char const *)arg3);
 }
 
 
index 7d919bb814c252ea8f8bc6ac7ca4f45a1303e11f..ba3122e3ab352f131fae805d2ae475a13a55ec71 100644 (file)
@@ -8937,15 +8937,15 @@ XS(_wrap_CoreSession_execute__SWIG_0) {
     arg1 = reinterpret_cast< CoreSession * >(argp1);
     res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
     if (!SWIG_IsOK(res2)) {
-      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_execute" "', argument " "2"" of type '" "char *""'");
+      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_execute" "', argument " "2"" of type '" "char const *""'");
     }
     arg2 = reinterpret_cast< char * >(buf2);
     res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
     if (!SWIG_IsOK(res3)) {
-      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_execute" "', argument " "3"" of type '" "char *""'");
+      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_execute" "', argument " "3"" of type '" "char const *""'");
     }
     arg3 = reinterpret_cast< char * >(buf3);
-    (arg1)->execute(arg2,arg3);
+    (arg1)->execute((char const *)arg2,(char const *)arg3);
     
     
     if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
@@ -8982,10 +8982,10 @@ XS(_wrap_CoreSession_execute__SWIG_1) {
     arg1 = reinterpret_cast< CoreSession * >(argp1);
     res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
     if (!SWIG_IsOK(res2)) {
-      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_execute" "', argument " "2"" of type '" "char *""'");
+      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_execute" "', argument " "2"" of type '" "char const *""'");
     }
     arg2 = reinterpret_cast< char * >(buf2);
-    (arg1)->execute(arg2);
+    (arg1)->execute((char const *)arg2);
     
     
     if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
@@ -11483,17 +11483,17 @@ XS(SWIG_init) {
   SWIG_TypeClientData(SWIGTYPE_p_IVRMenu, (void*) "freeswitch::IVRMenu");
   SWIG_TypeClientData(SWIGTYPE_p_API, (void*) "freeswitch::API");
   SWIG_TypeClientData(SWIGTYPE_p_input_callback_state, (void*) "freeswitch::input_callback_state_t");
-  /*@SWIG:/usr/local/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
+  /*@SWIG:/usr/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
     SV *sv = get_sv((char*) SWIG_prefix "S_HUP", TRUE | 0x2 | GV_ADDMULTI);
     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(S_HUP)));
     SvREADONLY_on(sv);
   } while(0) /*@SWIG@*/;
-  /*@SWIG:/usr/local/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
+  /*@SWIG:/usr/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
     SV *sv = get_sv((char*) SWIG_prefix "S_FREE", TRUE | 0x2 | GV_ADDMULTI);
     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(S_FREE)));
     SvREADONLY_on(sv);
   } while(0) /*@SWIG@*/;
-  /*@SWIG:/usr/local/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
+  /*@SWIG:/usr/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
     SV *sv = get_sv((char*) SWIG_prefix "S_RDLOCK", TRUE | 0x2 | GV_ADDMULTI);
     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(S_RDLOCK)));
     SvREADONLY_on(sv);
index 34121fbbd178e59fcc2b103df907bc4cbcb84511..5a800640e5bb68f111de17c980f21249ff246c99 100644 (file)
@@ -8609,15 +8609,15 @@ SWIGINTERN PyObject *_wrap_CoreSession_execute__SWIG_0(PyObject *SWIGUNUSEDPARM(
   arg1 = reinterpret_cast< CoreSession * >(argp1);
   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_execute" "', argument " "2"" of type '" "char *""'");
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_execute" "', argument " "2"" of type '" "char const *""'");
   }
   arg2 = reinterpret_cast< char * >(buf2);
   res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
   if (!SWIG_IsOK(res3)) {
-    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_execute" "', argument " "3"" of type '" "char *""'");
+    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_execute" "', argument " "3"" of type '" "char const *""'");
   }
   arg3 = reinterpret_cast< char * >(buf3);
-  (arg1)->execute(arg2,arg3);
+  (arg1)->execute((char const *)arg2,(char const *)arg3);
   resultobj = SWIG_Py_Void();
   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
@@ -8649,10 +8649,10 @@ SWIGINTERN PyObject *_wrap_CoreSession_execute__SWIG_1(PyObject *SWIGUNUSEDPARM(
   arg1 = reinterpret_cast< CoreSession * >(argp1);
   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
   if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_execute" "', argument " "2"" of type '" "char *""'");
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_execute" "', argument " "2"" of type '" "char const *""'");
   }
   arg2 = reinterpret_cast< char * >(buf2);
-  (arg1)->execute(arg2);
+  (arg1)->execute((char const *)arg2);
   resultobj = SWIG_Py_Void();
   if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
   return resultobj;
@@ -8706,8 +8706,8 @@ SWIGINTERN PyObject *_wrap_CoreSession_execute(PyObject *self, PyObject *args) {
 fail:
   SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CoreSession_execute'.\n"
     "  Possible C/C++ prototypes are:\n"
-    "    execute(CoreSession *,char *,char *)\n"
-    "    execute(CoreSession *,char *)\n");
+    "    execute(CoreSession *,char const *,char const *)\n"
+    "    execute(CoreSession *,char const *)\n");
   return NULL;
 }
 
index ec43e58a498398fd2d9229f888d1c9d76615d896..8ba3f0f6f01e72c38e3e1041864fd616eeb64173 100644 (file)
@@ -580,18 +580,15 @@ SWITCH_DECLARE(const char *)CoreSession::getVariable(char *var)
     return switch_channel_get_variable(channel, var);
 }
 
-SWITCH_DECLARE(void) CoreSession::execute(char *app, char *data)
+SWITCH_DECLARE(void) CoreSession::execute(const char *app, const char *data)
 {
        const switch_application_interface_t *application_interface;
        this_check_void();
        sanity_check_noreturn;
 
-    switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "CoreSession::execute.  app: %s data:%s\n", app, data);
-       if ((application_interface = switch_loadable_module_get_application_interface(app))) {
-               begin_allow_threads();
-               switch_core_session_exec(session, application_interface, data);
-               end_allow_threads();
-       }
+       begin_allow_threads();
+       switch_core_session_execute_application(session, app, data);
+       end_allow_threads();
 }
 
 SWITCH_DECLARE(void) CoreSession::setDTMFCallback(void *cbfunc, char *funcargs) {