res_pjsip_outbound_publish: eventually crashes when no response is ever received
authorKevin Harwell <kharwell@digium.com>
Fri, 30 Jan 2015 17:41:02 +0000 (17:41 +0000)
committerKevin Harwell <kharwell@digium.com>
Fri, 30 Jan 2015 17:41:02 +0000 (17:41 +0000)
commit5c9f1b3f5171bc4b72ec0d5ae29799dcf99d5995
tree2256cc2763eb12d394ba60583795b23217eb817d
parent6a76740b83c1ced26e9464a7abb5b30de4a60e6f
res_pjsip_outbound_publish: eventually crashes when no response is ever received

When Asterisk attempts to send SIP outbound publish information and no response
is ever received (no 200 okay, 412, 423) the system eventually crashes. A
response is never received because the system Asterisk is attempting to send
publish information to is not available. The underlying pjsip framework attempts
to send publish information. After several attempts it calls back into the
Asterisk outbound publish code. At this point if the "client->queue" is empty
Asterisk attempts to schedule a refresh which utilizes "rdata" and since no
response was received the given "rdata" struture is NULL. Attempting to
dereference a NULL object of course results in a crash.

The fix here removes the dependency on rdata for schedule_publish_refresh.
Instead param->expiration is now passed to it as this is set to -1 if no
response is received. Also added a notification when no response is received.

ASTERISK-24635 #close
Reported by: Marco Paland
Review: https://reviewboard.asterisk.org/r/4384/
........

Merged revisions 431490 from http://svn.asterisk.org/svn/asterisk/branches/13

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@431491 65c4cc65-6c06-0410-ace0-fbb531ad65f3
res/res_pjsip_outbound_publish.c