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

Freeswitch SVN mikej at freeswitch.org
Sat Oct 4 00:58:22 EDT 2008


Author: mikej
Date: Sat Oct  4 00:58:20 2008
New Revision: 9821

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

Log:
a little more cleanup

Modified: freeswitch/trunk/src/mod/languages/mod_managed/freeswitch_managed.cpp
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_managed/freeswitch_managed.cpp	(original)
+++ freeswitch/trunk/src/mod/languages/mod_managed/freeswitch_managed.cpp	Sat Oct  4 00:58:20 2008
@@ -26,30 +26,29 @@
  * Michael Giagnocavo <mgg at packetrino.com>
  * Jeff Lenk <jlenk at frontiernet.net> - Modified class to support Dotnet
  * 
- * freeswitch_cli.cpp -- CLI CoreSession subclasses
+ * freeswitch_managed.cpp -- Managed CoreSession subclasses
  *
  */  
 
-
 #include <switch.h>
 #include <switch_cpp.h>
-#ifndef _MANAGED
-#include <glib.h>
-#include <mono/jit/jit.h>
-#include <mono/metadata/assembly.h>
-#include <mono/metadata/environment.h>
-#include <mono/metadata/threads.h>
-#include <mono/metadata/metadata.h>
-#endif
-
-#include "freeswitch_managed.h"
 
 #ifdef _MANAGED
 #define ATTACH_THREADS
 #else
+#include <glib.h>
+#include <mono/metadata/threads.h>
 #define ATTACH_THREADS mono_thread_attach(globals.domain);
 #endif
 
+#ifdef WIN32
+#define RESULT_FREE(x) CoTaskMemFree(x)
+#else
+#define RESULT_FREE(x) g_free(x)
+#endif
+
+#include "freeswitch_managed.h"
+
 ManagedSession::ManagedSession():CoreSession() 
 {
 
@@ -75,7 +74,6 @@
 	return true;
 }
 
-
 ManagedSession::~ManagedSession() 
 {
 	ATTACH_THREADS
@@ -112,11 +110,8 @@
 	char *result = dtmfDelegate(input, itype);
 	switch_status_t status = process_callback_result(result);
 
-#if WIN32
-	CoTaskMemFree(result); 
-#else
-	g_free(result)
-#endif
+	RESULT_FREE(result); 
+
 	return status;
 }
 



More information about the Freeswitch-svn mailing list