Files
asterisk/third-party/pjproject/patches/0002-Fix-1946-Avoid-deinitialization-of-uninitialized-cli.patch
George Joseph b4f1c6380e pjproject_bundled: Update for pjproject 2.5.5
Add more --disable-* switches to Makefile.rules including
--disable-opus which was causing bundled pjproject to fail with
"undefined reference" errors in libasteriskpj.

Changed PJ_ENABLE_EXTRA_CHECK to 1.

Removed 2 obsolete patches and added a new one.
The new one was merged by Teluu on 6/27/2016.

ASTERISK-26148 #close

Change-Id: Ib8af6c6a9d31f7238ce65b336134c2efdc855063
2016-07-28 08:07:21 -05:00

57 lines
1.9 KiB
Diff

From 33fd755e819dc85a96718abc0ae26a9b46f14800 Mon Sep 17 00:00:00 2001
From: nanang <nanang@localhost>
Date: Thu, 28 Jul 2016 08:21:45 +0000
Subject: [PATCH 2/3] Fix #1946: Avoid deinitialization of uninitialized client
auth session.
---
pjsip/src/pjsip/sip_dialog.c | 18 ++++++------------
1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/pjsip/src/pjsip/sip_dialog.c b/pjsip/src/pjsip/sip_dialog.c
index f03885d..421ddc4 100644
--- a/pjsip/src/pjsip/sip_dialog.c
+++ b/pjsip/src/pjsip/sip_dialog.c
@@ -92,6 +92,12 @@ static pj_status_t create_dialog( pjsip_user_agent *ua,
pj_list_init(&dlg->inv_hdr);
pj_list_init(&dlg->rem_cap_hdr);
+ /* Init client authentication session. */
+ status = pjsip_auth_clt_init(&dlg->auth_sess, dlg->endpt,
+ dlg->pool, 0);
+ if (status != PJ_SUCCESS)
+ goto on_error;
+
status = pj_mutex_create_recursive(pool, dlg->obj_name, &dlg->mutex_);
if (status != PJ_SUCCESS)
goto on_error;
@@ -283,12 +289,6 @@ PJ_DEF(pj_status_t) pjsip_dlg_create_uac( pjsip_user_agent *ua,
/* Initial route set is empty. */
pj_list_init(&dlg->route_set);
- /* Init client authentication session. */
- status = pjsip_auth_clt_init(&dlg->auth_sess, dlg->endpt,
- dlg->pool, 0);
- if (status != PJ_SUCCESS)
- goto on_error;
-
/* Register this dialog to user agent. */
status = pjsip_ua_register_dlg( ua, dlg );
if (status != PJ_SUCCESS)
@@ -506,12 +506,6 @@ pj_status_t create_uas_dialog( pjsip_user_agent *ua,
}
dlg->route_set_frozen = PJ_TRUE;
- /* Init client authentication session. */
- status = pjsip_auth_clt_init(&dlg->auth_sess, dlg->endpt,
- dlg->pool, 0);
- if (status != PJ_SUCCESS)
- goto on_error;
-
/* Increment the dialog's lock since tsx may cause the dialog to be
* destroyed prematurely (such as in case of transport error).
*/
--
2.7.4