<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">So once it has been initialized, leave it in memory and re-use the same instance. If you really insist on completely unloading it, launch freeswitch as an external process and communicate with it using event socket.<div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div><span class="Apple-style-span" style="font-size: 12px; "><div>Mathieu Rene</div><div>Avant-Garde Solutions Inc</div><div>Office: + 1 (514) 664-1044 x100</div><div>Cell: +1 (514) 664-1044 x200</div><div><a href="mailto:mrene@avgs.ca">mrene@avgs.ca</a></div><div><br></div><div><br></div></span></div></span><br class="Apple-interchange-newline">
</div>
<br><div><div>On 2010-06-30, at 1:44 PM, Paulo Vicentini wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hi,</div><div>I require that because by embedding libfreeswitch in my app there is time when my code using libfreeswitch is "out of context" so that I need to call switch_core_destroy but when I "in context" again I suppose to call switch_core_init_and_modload so that It would be usefull to have the core plugable as well.</div>
<div></div><div>Thanks</div><div></div><div><br></div><div class="gmail_quote">On Wed, Jun 30, 2010 at 2:07 PM, Mathieu Rene <span dir="ltr">&lt;<a href="mailto:mrene_lists@avgs.ca">mrene_lists@avgs.ca</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">A lot of stuff is statically initialized, the core isn't designed to be loaded/unloaded like that. Why exactly do you require calling switch_core_init_and_modload() after the initial startup?<br>

<br>
Mathieu Rene<br>
Avant-Garde Solutions Inc<br>
Office: + 1 (514) 664-1044 x100<br>
Cell: +1 (514) 664-1044 x200<br>
<a href="mailto:mrene@avgs.ca">mrene@avgs.ca</a><br>
<div><div class="h5"><br>
<br>
<br>
<br>
On 2010-06-30, at 12:44 PM, Paulo Vicentini wrote:<br>
<br>
&gt; Hi,<br>
&gt; I am embedding libfreeswitch to my application's process space and I need to "init" and "destroy" freeswitch while running my process.<br>
&gt; I face problems after calling switch_core_destroy and when my business logic demands I call switch_core_init_and_modload to work with libfreeswitch (again)<br>
&gt; It seems that struct switch_runtime runtime is not cleared aproprietaly when destroying the core.<br>
&gt; I made some tests clearing runtime struct but still getting segfaults on apr_queue_trypush (trying to find out the issue)<br>
&gt; Can you please help me out with this issue?<br>
&gt; Thanks<br>
</div></div>&gt; _______________________________________________<br>
&gt; FreeSWITCH-dev mailing list<br>
&gt; <a href="mailto:FreeSWITCH-dev@lists.freeswitch.org">FreeSWITCH-dev@lists.freeswitch.org</a><br>
&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
&gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
&gt; <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org</a><br>
<br>
<br>
_______________________________________________<br>
FreeSWITCH-dev mailing list<br>
<a href="mailto:FreeSWITCH-dev@lists.freeswitch.org">FreeSWITCH-dev@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
<a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org</a><br>
</blockquote></div><br>
_______________________________________________<br>FreeSWITCH-dev mailing list<br><a href="mailto:FreeSWITCH-dev@lists.freeswitch.org">FreeSWITCH-dev@lists.freeswitch.org</a><br>http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev<br>UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev<br>http://www.freeswitch.org<br></blockquote></div><br></div></body></html>