Changeset 5401


Ignore:
Timestamp:
Jul 28, 2016 8:21:45 AM (8 years ago)
Author:
nanang
Message:

Fix #1946: Avoid deinitialization of uninitialized client auth session.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsip/sip_dialog.c

    r5373 r5401  
    9393    pj_list_init(&dlg->rem_cap_hdr); 
    9494 
     95    /* Init client authentication session. */ 
     96    status = pjsip_auth_clt_init(&dlg->auth_sess, dlg->endpt, 
     97                                 dlg->pool, 0); 
     98    if (status != PJ_SUCCESS) 
     99        goto on_error; 
     100 
    95101    status = pj_mutex_create_recursive(pool, dlg->obj_name, &dlg->mutex_); 
    96102    if (status != PJ_SUCCESS) 
     
    283289    /* Initial route set is empty. */ 
    284290    pj_list_init(&dlg->route_set); 
    285  
    286     /* Init client authentication session. */ 
    287     status = pjsip_auth_clt_init(&dlg->auth_sess, dlg->endpt, 
    288                                  dlg->pool, 0); 
    289     if (status != PJ_SUCCESS) 
    290         goto on_error; 
    291291 
    292292    /* Register this dialog to user agent. */ 
     
    506506    } 
    507507    dlg->route_set_frozen = PJ_TRUE; 
    508  
    509     /* Init client authentication session. */ 
    510     status = pjsip_auth_clt_init(&dlg->auth_sess, dlg->endpt, 
    511                                  dlg->pool, 0); 
    512     if (status != PJ_SUCCESS) 
    513         goto on_error; 
    514508 
    515509    /* Increment the dialog's lock since tsx may cause the dialog to be 
Note: See TracChangeset for help on using the changeset viewer.