[asterisk-dev] [Code Review] 4579: res_pjsip_messaging: Serialize outgoing MESSAGEs

Mark Michelson reviewboard at asterisk.org
Fri Apr 3 16:53:51 CDT 2015


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4579/
-----------------------------------------------------------

(Updated April 3, 2015, 4:53 p.m.)


Status
------

This change has been marked as submitted.


Review request for Asterisk Developers.


Changes
-------

Committed in revision 433968


Bugs: ASTERISK-24937
    https://issues.asterisk.org/jira/browse/ASTERISK-24937


Repository: Asterisk


Description
-------

Because res_pjsip_messaging throws all messages to send into the threadpool, there is no guarantee that consecutive outgoing messages from the same dialplan execution will be sent in the same order.
So for instance, if you had the following dialplan:

exten => hello,1,NoOp()
same => n,SendMessage(hello)
same => n,SendMessage(world)

It would be expected that the "hello" message would be sent before the "world" message. However, it cannot be guaranteed this will happen with the current threadpool usage.

The patch on this review introduces a serializer for outgoing MESSAGE requests from Asterisk. This ensures that all MESSAGE requests are sent in the same order that they are processed in the dialplan.


Diffs
-----

  /branches/13/res/res_pjsip_messaging.c 433838 

Diff: https://reviewboard.asterisk.org/r/4579/diff/


Testing
-------

The bug itself is incredibly difficult to have happen under normal circumstances, but I have confirmed that this patch has not hindered operations any.


Thanks,

Mark Michelson

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20150403/a6316179/attachment.html>


More information about the asterisk-dev mailing list