[OpenSIPS-Users] FIFO very fragile
Brett Nemeroff
brett at nemeroff.com
Wed May 11 15:58:03 CEST 2011
On Wed, May 11, 2011 at 8:51 AM, Vlad Paiu <vladpaiu at opensips.org> wrote:
> Hello Brett,
>
> A well formed MI command should end with two '\n\n' characters. When you do
>
> echo -e ":address_dump:my_fifo\n\n"
>
> ,your MI command ends with three '\n', because echo adds an extra \n at the
> end, unless you use the -n parameter.
>
> So what happens is that OpenSIPS successfully processes your address_dump
> MI command, and then reads the third \n.
> 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.
>
>
Vlad,
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?
-Brett
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20110511/b368a0f7/attachment.htm>
More information about the Users
mailing list