[Freeswitch-users] mod_managed on linux centos
Yitzchok
adminjew at gmail.com
Tue Oct 5 22:20:56 PDT 2010
--Bug Fix--
Here is a diff file for *src/mod/languages/mod_managed/mod_managed.cpp *it
seems to work but I don't know if this has some side effects.
----
@@ -377,17 +377,13 @@ SWITCH_STANDARD_API(managedrun_api_function)
stream->write_function(stream, "-ERR no args specified!\n");
return SWITCH_STATUS_SUCCESS;
}
-#ifndef _MANAGED
- mono_thread_attach(globals.domain);
-#endif
+
if (executeBackgroundDelegate(cmd)) {
stream->write_function(stream, "+OK\n");
} 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;
}
@@ -397,15 +393,11 @@ SWITCH_STANDARD_API(managed_api_function)
stream->write_function(stream, "-ERR no args specified!\n");
return SWITCH_STATUS_SUCCESS;
}
-#ifndef _MANAGED
- mono_thread_attach(globals.domain);
-#endif
+
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;
}
@@ -415,15 +407,11 @@ SWITCH_STANDARD_APP(managed_app_function)
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "No args
specified!\n");
return;
}
-#ifndef _MANAGED
- mono_thread_attach(globals.domain);
-#endif
+
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)
@@ -432,15 +420,11 @@ SWITCH_STANDARD_API(managedreload_api_function)
stream->write_function(stream, "-ERR no args specified!\n");
return SWITCH_STATUS_SUCCESS;
}
-#ifndef _MANAGED
- mono_thread_attach(globals.domain);
-#endif
+
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 Mon, Oct 4, 2010 at 12:04 PM, Yitzchok <adminjew at gmail.com> wrote:
> I have already done that but it doesn't help also note that on the first
> call it works fine.
>
>
> Yitzchok
>
>
>
> On Mon, Oct 4, 2010 at 11:12 AM, Jeff Lenk <jeff at jefflenk.com> wrote:
>
>>
>> Have you seen:
>> http://wiki.freeswitch.org/wiki/Mod_mono
>>
>> <dllmap dll="mod_managed.dll" target="mod_managed.so" os="!windows"/>
>>
>> regarding null exceptions?
>> --
>> View this message in context:
>> http://freeswitch-users.2379917.n2.nabble.com/mod-managed-on-linux-centos-tp5485480p5599563.html
>> Sent from the freeswitch-users mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> FreeSWITCH-users mailing list
>> FreeSWITCH-users at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> http://www.freeswitch.org
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20101006/e0c6f199/attachment-0001.html
More information about the FreeSWITCH-users
mailing list