diff options
author | zuul <zuul@gerrit.asterisk.org> | 2016-02-12 16:50:15 -0600 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2016-02-12 16:50:16 -0600 |
commit | 953ba9da887f92a46ae089ecacf342e8acbf30ed (patch) | |
tree | c74a0be77e6a02384062797ad1c4513943f0520c /res/res_pjsip.c | |
parent | ac00c6bc2dfe89d61b52c988e38c8765c698ef59 (diff) | |
parent | c1bf014ea08cf66835a6f000e2bd6c7da588da6b (diff) |
Merge "res_pjsip: Handle pjsip_dlg_create_uas deprecation" into 13
Diffstat (limited to 'res/res_pjsip.c')
-rw-r--r-- | res/res_pjsip.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/res/res_pjsip.c b/res/res_pjsip.c index d0d6ba946..992c9b4df 100644 --- a/res/res_pjsip.c +++ b/res/res_pjsip.c @@ -2715,7 +2715,11 @@ pjsip_dialog *ast_sip_create_dialog_uas(const struct ast_sip_endpoint *endpoint, (type != PJSIP_TRANSPORT_UDP && type != PJSIP_TRANSPORT_UDP6) ? ";transport=" : "", (type != PJSIP_TRANSPORT_UDP && type != PJSIP_TRANSPORT_UDP6) ? pjsip_transport_get_type_name(type) : ""); +#ifdef HAVE_PJSIP_DLG_CREATE_UAS_AND_INC_LOCK + *status = pjsip_dlg_create_uas_and_inc_lock(pjsip_ua_instance(), rdata, &contact, &dlg); +#else *status = pjsip_dlg_create_uas(pjsip_ua_instance(), rdata, &contact, &dlg); +#endif if (*status != PJ_SUCCESS) { char err[PJ_ERR_MSG_SIZE]; @@ -2728,6 +2732,9 @@ pjsip_dialog *ast_sip_create_dialog_uas(const struct ast_sip_endpoint *endpoint, dlg->sess_count++; pjsip_dlg_set_transport(dlg, &selector); dlg->sess_count--; +#ifdef HAVE_PJSIP_DLG_CREATE_UAS_AND_INC_LOCK + pjsip_dlg_dec_lock(dlg); +#endif return dlg; } |