It looks like these errors don't happen in Mono *2.8* when I use the original code. (leaving mono_thread_detach(mono_thread_current()); in there) Though now I see that *sometimes *when I update a dll file it doesn't work and I have to restart freeswitch and then it works. Yitzchok On Wed, Oct 6, 2010 at 11:40 AM, Yitzchok <adminjew@gmail.com> wrote:
I tried that and it seems to work.
---diff from git head---
@@ -385,9 +385,7 @@ SWITCH_STANDARD_API(managedrun_api_function) } else { stream->write_function(stream, "-ERR ExecuteBackground returned false (unknown module or exception?).\n"); } -#ifndef _MANAGED - mono_thread_detach(mono_thread_current()); -#endif + return SWITCH_STATUS_SUCCESS; }
@@ -403,9 +401,7 @@ SWITCH_STANDARD_API(managed_api_function) if (!(executeDelegate(cmd, stream, stream->param_event))) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Execute failed for %s (unknown module or exception).\n", cmd); } -#ifndef _MANAGED - mono_thread_detach(mono_thread_current()); -#endif + return SWITCH_STATUS_SUCCESS; }
@@ -421,9 +417,7 @@ SWITCH_STANDARD_APP(managed_app_function) if (!(runDelegate(data, session))) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Application run failed for %s (unknown module or exception).\n", data); } -#ifndef _MANAGED - mono_thread_detach(mono_thread_current()); -#endif + }
SWITCH_STANDARD_API(managedreload_api_function) @@ -438,9 +432,7 @@ SWITCH_STANDARD_API(managedreload_api_function) if (!(reloadDelegate(cmd))) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Execute failed for %s (unknown module or exception).\n", cmd); } -#ifndef _MANAGED - mono_thread_detach(mono_thread_current()); -#endif + return SWITCH_STATUS_SUCCESS; }
-----
Yitzchok
On Wed, Oct 6, 2010 at 10:57 AM, Jeff Lenk <jeff@jefflenk.com> wrote:
Not sure how this makes sense yet. Yitzchok would you try this with only the mono_thread_detach calls removed leaving the mono_thread_attach in place and see what happens.
Thanks Jeff -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/mod-managed-on-linux-centos-tp... Sent from the freeswitch-users mailing list archive at Nabble.com.
_______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org