Changeset 3377


Ignore:
Timestamp:
Dec 1, 2010 8:53:52 AM (13 years ago)
Author:
nanang
Message:

Misc (re #1151): fixed pjsua_acc_config_dup(), some fields, i.e: contact_params, contact_uri_params, and auth_pref, were not duplicated properly (thanks Roman Grachev for the report and the patch).

Location:
pjproject/trunk/pjsip
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/include/pjsip/sip_auth.h

    r3144 r3377  
    207207 
    208208/** 
     209 * Duplicate a client authentication preference setting. 
     210 * 
     211 * @param pool      The memory pool. 
     212 * @param dst       Destination client authentication preference. 
     213 * @param src       Source client authentication preference. 
     214 */ 
     215PJ_DECL(void) pjsip_auth_clt_pref_dup(pj_pool_t *pool, 
     216                                      pjsip_auth_clt_pref *dst, 
     217                                      const pjsip_auth_clt_pref *src); 
     218 
     219 
     220/** 
    209221 * This structure describes client authentication sessions. It keeps 
    210222 * all the information needed to authorize the client against all downstream  
  • pjproject/trunk/pjsip/src/pjsip/sip_auth_client.c

    r3149 r3377  
    109109on_return: 
    110110    return result; 
     111} 
     112 
     113PJ_DEF(void) pjsip_auth_clt_pref_dup( pj_pool_t *pool, 
     114                                      pjsip_auth_clt_pref *dst, 
     115                                      const pjsip_auth_clt_pref *src) 
     116{ 
     117    pj_memcpy(dst, src, sizeof(pjsip_auth_clt_pref)); 
     118    pj_strdup_with_null(pool, &dst->algorithm, &src->algorithm); 
    111119} 
    112120 
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_acc.c

    r3368 r3377  
    8787    pj_strdup_with_null(pool, &dst->reg_uri, &src->reg_uri); 
    8888    pj_strdup_with_null(pool, &dst->force_contact, &src->force_contact); 
     89    pj_strdup_with_null(pool, &dst->contact_params, &src->contact_params); 
     90    pj_strdup_with_null(pool, &dst->contact_uri_params, 
     91                        &src->contact_uri_params); 
    8992    pj_strdup_with_null(pool, &dst->pidf_tuple_id, &src->pidf_tuple_id); 
    90     pj_strdup_with_null(pool, &dst->rfc5626_instance_id, &src->rfc5626_instance_id); 
     93    pj_strdup_with_null(pool, &dst->rfc5626_instance_id, 
     94                        &src->rfc5626_instance_id); 
    9195    pj_strdup_with_null(pool, &dst->rfc5626_reg_id, &src->rfc5626_reg_id); 
    9296 
     
    112116        } 
    113117    } 
     118 
     119    pjsip_auth_clt_pref_dup(pool, &dst->auth_pref, &src->auth_pref); 
    114120 
    115121    dst->ka_interval = src->ka_interval; 
Note: See TracChangeset for help on using the changeset viewer.