Ignore:
Timestamp:
Apr 20, 2010 2:36:38 PM (14 years ago)
Author:
nanang
Message:

Ticket #1057: Implemented pjsua_modify_acc().

File:
1 edited

Legend:

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

    r2988 r3144  
    7979        dup_bin(pool, &dst->ext.aka.amf, &src->ext.aka.amf); 
    8080    } 
     81} 
     82 
     83 
     84PJ_DEF(int) pjsip_cred_info_cmp(const pjsip_cred_info *cred1, 
     85                                const pjsip_cred_info *cred2) 
     86{ 
     87    int result; 
     88 
     89    result = pj_strcmp(&cred1->realm, &cred2->realm); 
     90    if (result) return result; 
     91    result = pj_strcmp(&cred1->scheme, &cred2->scheme); 
     92    if (result) return result; 
     93    result = pj_strcmp(&cred1->username, &cred2->username); 
     94    if (result) return result; 
     95    result = pj_strcmp(&cred1->data, &cred2->data); 
     96    if (result) return result; 
     97    if (cred1->data_type != cred2->data_type) 
     98        return -1; 
     99 
     100    if ((cred1->data_type & EXT_MASK) == PJSIP_CRED_DATA_EXT_AKA) { 
     101        result = pj_strcmp(&cred1->ext.aka.k, &cred2->ext.aka.k); 
     102        if (result) return result; 
     103        result = pj_strcmp(&cred1->ext.aka.op, &cred2->ext.aka.op); 
     104        if (result) return result; 
     105        result = pj_strcmp(&cred1->ext.aka.amf, &cred2->ext.aka.amf); 
     106        if (result) return result; 
     107    } 
     108 
     109    return result; 
    81110} 
    82111 
Note: See TracChangeset for help on using the changeset viewer.