Ignore:
Timestamp:
Sep 28, 2010 10:48:48 AM (12 years ago)
Author:
nanang
Message:

Close #1137: added field reg_hdr_list into pjsua_acc_config to specify custom headers for REGISTER requests of the account.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_acc.c

    r3323 r3326  
    9090    for (i=0; i<src->cred_count; ++i) { 
    9191        pjsip_cred_dup(pool, &dst->cred_info[i], &src->cred_info[i]); 
     92    } 
     93 
     94    pj_list_init(&dst->reg_hdr_list); 
     95    if (!pj_list_empty(&src->reg_hdr_list)) { 
     96        const pjsip_hdr *hdr; 
     97 
     98        hdr = src->reg_hdr_list.next; 
     99        while (hdr != &src->reg_hdr_list) { 
     100            pj_list_push_back(&dst->reg_hdr_list, pjsip_hdr_clone(pool, hdr)); 
     101            hdr = hdr->next; 
     102        } 
    92103    } 
    93104 
     
    16571668            pjsip_regc_set_route_set( acc->regc, &route_set ); 
    16581669    } 
     1670 
     1671    /* Add custom request headers specified in the account config */ 
     1672    pjsip_regc_add_headers(acc->regc, &acc->cfg.reg_hdr_list); 
    16591673 
    16601674    /* Add other request headers. */ 
Note: See TracChangeset for help on using the changeset viewer.