[Pkg-voip-commits] [pjproject] 04/14: Fix #1946: Avoid deinitialization of uninitialized client
Bernhard Schmidt
berni at moszumanska.debian.org
Thu Nov 10 09:32:01 UTC 2016
This is an automated email from the git hooks/post-receive script.
berni pushed a commit to branch master
in repository pjproject.
commit 9775414149032bf86aec9b59dca3d7f0324a7741
Author: nanang <nanang at localhost>
Date: Thu Jul 28 08:21:45 2016 +0000
Fix #1946: Avoid deinitialization of uninitialized client
auth session.
Patch-Category: asterisk
---
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 800e9f3..ad736fb 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).
*/
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-voip/pjproject.git
More information about the Pkg-voip-commits
mailing list