summaryrefslogtreecommitdiff
path: root/sample.call
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2015-09-01 09:05:34 -0500
committerMark Michelson <mmichelson@digium.com>2015-09-01 09:41:10 -0500
commitbeb568e51c1698951856d01ba844e528984959f9 (patch)
tree25fcd8c720b4c87a15959c72c6a0ae13d65b7163 /sample.call
parente23a01acbbef147824be26189d67b454663bf60c (diff)
res_pjsip_pubsub: re-re-fix persistent subscription storage.
A recent change to res_pjsip_pubsub switched to using pjsip_msg_print as a means of writing an appropriate packet to persistent storage. While this partially solved the issue, it had its own problems. pjsip_msg_print will always add a Content-Length header to the message it prints. Frequent restarts of Asterisk can result in persistent subscriptions being written with five or more Content-Length headers. In addition, sometimes some apparent corruption of individual headers could be seen. This aims to fix the problem by not running a parsed message through an interpreter but rather by taking the raw message and saving it. The logic for what to save is going to be different depending on whether a SUBSCRIBE was received from the wire or if it was pulled from persistence. When receiving a packet from the wire, when using a streaming transport, the rdata->pkt_info.packet may contain multiple SIP messages or fragments. However, the rdata->msg_info.msg_buf will always contain the current SIP message to be processed. When pulling from persistence, though, the rdata->msg_info.msg_buf will be NULL since no transport actually handled the packet. However, since we know that we will always ever pull one SIP message from persistence, we are free to save directly from rdata->pkt_info.packet instead. ASTERISK-25365 #close Reported by Mark Michelson Change-Id: I33153b10d0b4dc8e3801aaaee2f48173b867855b
Diffstat (limited to 'sample.call')
0 files changed, 0 insertions, 0 deletions