chan_pjsip: segfault on already disconnected session
authorAlexei Gradinari <alex2grad@gmail.com>
Tue, 18 Oct 2016 14:04:54 +0000 (10:04 -0400)
committerAlexei Gradinari <alex2grad@gmail.com>
Tue, 25 Oct 2016 15:21:28 +0000 (10:21 -0500)
commit2b9ad3a5f736b6a4081e172f2a6d35dcd20b51e4
tree1ecd08a1c3a28c8b6a6fd4dcdacb1a04e453d22f
parent7c79b057dd3b0a06000b7bdd0583648bfc643b96
chan_pjsip: segfault on already disconnected session

On heavy loaded system the TCP/TLS incoming calls could be
disconnected by pjproject while these calls are being
processed by asterisk.

This patch uses functions pjsip_inv_add_ref/pjsip_inv_dec_ref
to inform pjproject that an INVITE session is in use.

ASTERISK-26482 #close

Change-Id: Ia2e3e2f75358cdb530252a9ce158af3d5d9fdf33
channels/chan_pjsip.c