]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
a little more cleanup
authorMichael Jerris <mike@jerris.com>
Sat, 4 Oct 2008 07:05:49 +0000 (07:05 +0000)
committerMichael Jerris <mike@jerris.com>
Sat, 4 Oct 2008 07:05:49 +0000 (07:05 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9828 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/languages/mod_managed/mod_managed.cpp

index 98e39e4951c3e26b7bc3f60a7ec863bef890e1bb..1882c196cef89e46aa315342266bd6c421dea6e4 100644 (file)
@@ -63,11 +63,10 @@ SWITCH_STANDARD_APP(managed_app_function);  /* Run */
 \r
 mod_managed_globals globals = { 0 };\r
 \r
-#ifndef _MANAGED       \r
-\r
 // Sets up delegates (and anything else needed) on the ManagedSession object\r
-// Called via internalcall\r
-SWITCH_MOD_DECLARE(void) InitManagedSession(ManagedSession * session, inputFunction dtmfDelegate, hangupFunction hangupDelegate) \r
+// Called from ManagedSession.Initialize Managed -> this is Unmanaged code so all pointers are marshalled and prevented from GC\r
+// Exported method.\r
+SWITCH_MOD_DECLARE(void) InitManagedSession(ManagedSession *session, inputFunction dtmfDelegate, hangupFunction hangupDelegate) \r
 {\r
        switch_assert(session);\r
        if (!session) {\r
@@ -79,6 +78,8 @@ SWITCH_MOD_DECLARE(void) InitManagedSession(ManagedSession * session, inputFunct
        session->hangupDelegate = hangupDelegate;\r
 }\r
 \r
+#ifndef _MANAGED       \r
+\r
 #ifdef WIN32\r
 #include <shlobj.h>\r
 #endif \r
@@ -262,20 +263,6 @@ switch_status_t findLoader()
 **********************************************************/\r
 \r
 #ifdef _MANAGED\r
-// Sets up delegates (and anything else needed) on the ManagedSession object\r
-// Called from ManagedSession.Initialize Managed -> this is Unmanaged code so all pointers are marshalled and prevented from GC\r
-// Exported method.\r
-SWITCH_MOD_DECLARE(void) InitManagedSession(ManagedSession *session, inputFunction dtmfDelegate, hangupFunction hangupDelegate) \r
-{\r
-       switch_assert(session);\r
-       if (!session) {\r
-               return;\r
-       }\r
-       session->setDTMFCallback(NULL, "");\r
-       session->setHangupHook(NULL);\r
-       session->dtmfDelegate = dtmfDelegate;\r
-       session->hangupDelegate = hangupDelegate;\r
-}\r
 \r
 switch_status_t loadRuntime() \r
 {\r