summaryrefslogtreecommitdiff
path: root/include/asterisk/autoconfig.h.in
diff options
context:
space:
mode:
authorAlexei Gradinari <alex2grad@gmail.com>2016-08-18 15:45:59 -0400
committerAlexei Gradinari <alex2grad@gmail.com>2016-09-06 08:58:42 -0500
commit7bb7f7b9d52fdaf50a6e13bbe0529151f920ac08 (patch)
tree015ad65339d18e608323192348a430e9d092f1a4 /include/asterisk/autoconfig.h.in
parente34f299a9672f829ee8d6652d221700fe2c6c56d (diff)
res_pjsip_session: 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 which could use the session's memory pools. If the session in the disconnected state then the session memory pools were already freed, so we get segfault. This patch adds a lifetime control on an INVITE session to pjproject. The lifetime of the session is manipulated by calling pjsip_inv_add_ref/pjsip_inv_dec_ref. This patch uses these functions to inform pjproject that the session is in use. This patch adds check if the session state is not disconnected and also checks if the memory pool is not NULL. This patch also places tasks 'session_end' and 'session_end_completion' into session's serializer to avoid race condition. ASTERISK-26291 #close Change-Id: I4d28b1fb3b91f0492a911d110049d670fdc3c8d7
Diffstat (limited to 'include/asterisk/autoconfig.h.in')
-rw-r--r--include/asterisk/autoconfig.h.in3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/asterisk/autoconfig.h.in b/include/asterisk/autoconfig.h.in
index f9a6b46e4..5e7ea7e2a 100644
--- a/include/asterisk/autoconfig.h.in
+++ b/include/asterisk/autoconfig.h.in
@@ -598,6 +598,9 @@
/* Define if your system has pjsip_get_dest_info declared. */
#undef HAVE_PJSIP_GET_DEST_INFO
+/* Define if your system has PJSIP_INV_SESSION_REF */
+#undef HAVE_PJSIP_INV_SESSION_REF
+
/* Define if your system has the PJSIP_REPLACE_MEDIA_STREAM headers. */
#undef HAVE_PJSIP_REPLACE_MEDIA_STREAM