[Freeswitch-svn] [commit] r9828 - freeswitch/trunk/src/mod/languages/mod_managed

Freeswitch SVN mikej at freeswitch.org
Sat Oct 4 03:05:49 EDT 2008


Author: mikej
Date: Sat Oct  4 03:05:49 2008
New Revision: 9828

Modified:
   freeswitch/trunk/src/mod/languages/mod_managed/mod_managed.cpp

Log:
a little more cleanup

Modified: freeswitch/trunk/src/mod/languages/mod_managed/mod_managed.cpp
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_managed/mod_managed.cpp	(original)
+++ freeswitch/trunk/src/mod/languages/mod_managed/mod_managed.cpp	Sat Oct  4 03:05:49 2008
@@ -63,11 +63,10 @@
 
 mod_managed_globals globals = { 0 };
 
-#ifndef _MANAGED	
-
 // Sets up delegates (and anything else needed) on the ManagedSession object
-// Called via internalcall
-SWITCH_MOD_DECLARE(void) InitManagedSession(ManagedSession * session, inputFunction dtmfDelegate, hangupFunction hangupDelegate) 
+// Called from ManagedSession.Initialize Managed -> this is Unmanaged code so all pointers are marshalled and prevented from GC
+// Exported method.
+SWITCH_MOD_DECLARE(void) InitManagedSession(ManagedSession *session, inputFunction dtmfDelegate, hangupFunction hangupDelegate) 
 {
 	switch_assert(session);
 	if (!session) {
@@ -79,6 +78,8 @@
 	session->hangupDelegate = hangupDelegate;
 }
 
+#ifndef _MANAGED	
+
 #ifdef WIN32
 #include <shlobj.h>
 #endif	
@@ -262,20 +263,6 @@
 **********************************************************/
 
 #ifdef _MANAGED
-// Sets up delegates (and anything else needed) on the ManagedSession object
-// Called from ManagedSession.Initialize Managed -> this is Unmanaged code so all pointers are marshalled and prevented from GC
-// Exported method.
-SWITCH_MOD_DECLARE(void) InitManagedSession(ManagedSession *session, inputFunction dtmfDelegate, hangupFunction hangupDelegate) 
-{
-	switch_assert(session);
-	if (!session) {
-		return;
-	}
-	session->setDTMFCallback(NULL, "");
-	session->setHangupHook(NULL);
-	session->dtmfDelegate = dtmfDelegate;
-	session->hangupDelegate = hangupDelegate;
-}
 
 switch_status_t loadRuntime() 
 {



More information about the Freeswitch-svn mailing list