<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
Hello,<br>
<br>
Yes, there is no need to restart. The fifo engine attempts to flush any
extra bogus characters whenever an error occurs, but it blocking
attempts to clear them until it encounters a carriage return.<br>
<br>
Just push an extra carriage return to the fifo and that should clear
out the previous empty command and make it accept new MI requests again.<br>
<br>
<br>
Regards,<br>
<pre class="moz-signature" cols="72">-- 
Vlad Paiu
OpenSIPS Developer</pre>
<br>
<br>
<br>
On 05/11/2011 04:58 PM, Brett Nemeroff wrote:
<blockquote
 cite="mid:BANLkTi=FXM3Pb65T46Na29D8eJQCnh-oTw@mail.gmail.com"
 type="cite"><br>
  <div class="gmail_quote">On Wed, May 11, 2011 at 8:51 AM, Vlad Paiu <span
 dir="ltr">&lt;<a moz-do-not-send="true"
 href="mailto:vladpaiu@opensips.org">vladpaiu@opensips.org</a>&gt;</span>
wrote:<br>
  <blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
    <div text="#000000" bgcolor="#ffffff">Hello Brett,<br>
    <br>
A well formed MI command should end with two '\n\n' characters. When
you do
    <div class="im"><br>
&nbsp;&nbsp;&nbsp; echo -e ":address_dump:my_fifo\n\n"<br>
    <br>
    </div>
,your MI command ends with three '\n', because echo adds an extra \n at
the end, unless you use the -n parameter.<br>
    <br>
So what happens is that OpenSIPS successfully processes your
address_dump MI command, and then reads the third \n.<br>
It treats it as an empty MI command, and attempts to block and read the
second \n signaling the end of the MI command, and there it gets stuck.<br>
    <br>
    </div>
  </blockquote>
  <div><br>
  </div>
  <div>Vlad,</div>
  <div>Thanks for this explaination, that makes a *lot* of sense.
However, I feel like sending "crap" to the fifo shouldn't break it,
right? At least, it should eventually clear itself out or reset itself
without requiring a restart. Right? If I had sent it just one more
carriage return, do you think it would clear it out?</div>
  <div><br>
-Brett</div>
  <div>&nbsp;</div>
  </div>
  <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
  </pre>
</blockquote>
<br>
<br>
</body>
</html>