stream->write_function(stream, "-ERR no args specified!\n"); \r
return SWITCH_STATUS_SUCCESS;\r
}\r
+#ifndef _MANAGED\r
+ mono_thread_attach(globals.domain);\r
+#endif\r
if (executeBackgroundDelegate(cmd)) {\r
stream->write_function(stream, "+OK\n");\r
} else { \r
stream->write_function(stream, "-ERR ExecuteBackground returned false (unknown module or exception?).\n");\r
}\r
+#ifndef _MANAGED\r
+ mono_thread_detach(mono_thread_current());\r
+#endif\r
return SWITCH_STATUS_SUCCESS;\r
}\r
\r
stream->write_function(stream, "-ERR no args specified!\n"); \r
return SWITCH_STATUS_SUCCESS;\r
}\r
+#ifndef _MANAGED\r
+ mono_thread_attach(globals.domain);\r
+#endif\r
if (!(executeDelegate(cmd, stream, stream->param_event))) {\r
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Execute failed for %s (unknown module or exception).\n", cmd); \r
}\r
+#ifndef _MANAGED\r
+ mono_thread_detach(mono_thread_current());\r
+#endif\r
return SWITCH_STATUS_SUCCESS;\r
}\r
\r
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "No args specified!\n");\r
return;\r
}\r
+#ifndef _MANAGED\r
+ mono_thread_attach(globals.domain);\r
+#endif\r
if (!(runDelegate(data, session))) {\r
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Application run failed for %s (unknown module or exception).\n", data);\r
}\r
+#ifndef _MANAGED\r
+ mono_thread_detach(mono_thread_current());\r
+#endif\r
}\r
\r
SWITCH_STANDARD_API(managedreload_api_function) \r
stream->write_function(stream, "-ERR no args specified!\n"); \r
return SWITCH_STATUS_SUCCESS;\r
}\r
+#ifndef _MANAGED\r
+ mono_thread_attach(globals.domain);\r
+#endif\r
if (!(reloadDelegate(cmd))) {\r
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Execute failed for %s (unknown module or exception).\n", cmd); \r
}\r
+#ifndef _MANAGED\r
+ mono_thread_detach(mono_thread_current());\r
+#endif\r
return SWITCH_STATUS_SUCCESS;\r
}\r
\r