[asterisk-dev] [Code Review] 3977: RLS: Pre-allocate transmission data buffer to allow for sending of large NOTIFY requests.

Mark Michelson reviewboard at asterisk.org
Mon Sep 8 12:33:31 CDT 2014


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

(Updated Sept. 8, 2014, 12:33 p.m.)


Status
------

This change has been marked as submitted.


Review request for Asterisk Developers.


Changes
-------

Committed in revision 422851


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


Repository: Asterisk


Description
-------

When testing RLS with large lists, it was found that attempting to send a full state NOTIFY request would result in an error from PJSIP of PJSIP_EMSGTOOLONG. I've written in detail about the problem on the following wiki page: https://wiki.asterisk.org/wiki/display/AST/PJSIP+Large+Messages

On that page, I propose several solutions to the problem. The one presented in this review is based on the edit at the bottom of the wiki page. We get around the max message size of PJSIP by pre-allocating the transmission data buffer to be large enough to hold whatever message we need to send. This way, PJSIP happily writes the message to the buffer and sends it on.

There are a couple of questionable bits in this review:
1) Even though we are working around PJSIP's maximum message size limit, this patch imposes its own limit of 64000 bytes for the message. Should we perhaps make this limit smaller? Larger? Transport-dependent?
2) If we detect that the message is too large to be sent, we return an error when attempting to send the NOTIFY. However, I wonder if we should also just terminate the subscription as well.


Diffs
-----

  /branches/13/res/res_pjsip_pubsub.c 422576 

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


Testing
-------

See /r/3978 for a testsuite test that exercises this.


Thanks,

Mark Michelson

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


More information about the asterisk-dev mailing list