<br><br><div><span class="gmail_quote">On 2/21/07, <b class="gmail_sendername">David Nicol</b> <<a href="mailto:davidnicol@gmail.com">davidnicol@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On 2/21/07, Trixter aka Bret McDanel <<a href="mailto:trixter@0xdecafbad.com">trixter@0xdecafbad.com</a>> wrote:<br>> To anyone that runs multiple instances you want to ensure that the db dir<br>> isnt used by some other FS process as well.
<br><br>there could be a multiple_instances WikiPage...<br><br>my main concern is to avoid crashing the server again if I somehow manage<br>to pull off another<br><br> perl -le ' 1 while `/usr/local/freeswitch/bin/freeswitch -nc`'
</blockquote><div><br>yeah, that is a potential issue, the patch I submitted to allow for specification to an alternate config should be consolodated, when I did it I didnt originally know that log, db and conf needed to be seperate, so I started out one at a time until I had all 3. Instead a better thing would be to edit
switch.c (iirc) to have a -prefix-dir arg or something and use that so you specify one prefix which contains a conf,db,log dir. So if you are mucking about in the code to prevent multiple instances (remember the solution should be cross platform, mikej might be best to advise you on the windows way, but it shouldnt be a unix only solution, and cant rely on perl as things like pocket pc which is a supported platform dont have perl).
<br><br>It would be trivial to adjust the 3 'if' statements into one and adjust those 3 prefixes (they need to be the same format so they work on both windows and unix like systems - it was coded the way it was for that specific reason). Then just strncpy() + strcat() or whatever works the different subdirs to the specified main dir. That would make that part easier, and look much cleaner at the same time :D
<br><br><br></div></div><br>-- <br>Trixter <a href="http://www.0xdecafbad.com">http://www.0xdecafbad.com</a> Bret McDanel<br>Belfast +44 28 9099 6461 US +1 516 687 5200<br><a href="http://www.trxtel.com">http://www.trxtel.com
</a> the VoIP provider that pays you!