Changeset 1240 for pjproject/trunk/pjsip/src/pjsip/sip_auth_msg.c
- Timestamp:
- May 1, 2007 4:54:54 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsip/sip_auth_msg.c
r974 r1240 47 47 PJ_DEF(pjsip_authorization_hdr*) pjsip_authorization_hdr_create(pj_pool_t *pool) 48 48 { 49 pjsip_authorization_hdr *hdr = pj_pool_calloc(pool, 1, sizeof(*hdr)); 49 pjsip_authorization_hdr *hdr; 50 hdr = PJ_POOL_ZALLOC_T(pool, pjsip_authorization_hdr); 50 51 init_hdr(hdr, PJSIP_H_AUTHORIZATION, &authorization_hdr_vptr); 51 52 pj_list_init(&hdr->credential.common.other_param); … … 55 56 PJ_DEF(pjsip_proxy_authorization_hdr*) pjsip_proxy_authorization_hdr_create(pj_pool_t *pool) 56 57 { 57 pjsip_proxy_authorization_hdr *hdr = pj_pool_calloc(pool, 1, sizeof(*hdr)); 58 pjsip_proxy_authorization_hdr *hdr; 59 hdr = PJ_POOL_ZALLOC_T(pool, pjsip_proxy_authorization_hdr); 58 60 init_hdr(hdr, PJSIP_H_PROXY_AUTHORIZATION, &authorization_hdr_vptr); 59 61 pj_list_init(&hdr->credential.common.other_param); … … 169 171 } 170 172 171 static pjsip_authorization_hdr* pjsip_authorization_hdr_shallow_clone( pj_pool_t *pool, 172 const pjsip_authorization_hdr *rhs) 173 static pjsip_authorization_hdr* 174 pjsip_authorization_hdr_shallow_clone( pj_pool_t *pool, 175 const pjsip_authorization_hdr *rhs) 173 176 { 174 177 /* This function also serves Proxy-Authorization header. */ 175 pjsip_authorization_hdr *hdr = pj_pool_alloc(pool, sizeof(*hdr)); 178 pjsip_authorization_hdr *hdr; 179 hdr = PJ_POOL_ALLOC_T(pool, pjsip_authorization_hdr); 176 180 pj_memcpy(hdr, rhs, sizeof(*hdr)); 177 181 pjsip_param_shallow_clone(pool, &hdr->credential.common.other_param, … … 202 206 PJ_DEF(pjsip_www_authenticate_hdr*) pjsip_www_authenticate_hdr_create(pj_pool_t *pool) 203 207 { 204 pjsip_www_authenticate_hdr *hdr = pj_pool_calloc(pool, 1, sizeof(*hdr)); 208 pjsip_www_authenticate_hdr *hdr; 209 hdr = PJ_POOL_ZALLOC_T(pool, pjsip_www_authenticate_hdr); 205 210 init_hdr(hdr, PJSIP_H_WWW_AUTHENTICATE, &www_authenticate_hdr_vptr); 206 211 pj_list_init(&hdr->challenge.common.other_param); … … 211 216 PJ_DEF(pjsip_proxy_authenticate_hdr*) pjsip_proxy_authenticate_hdr_create(pj_pool_t *pool) 212 217 { 213 pjsip_proxy_authenticate_hdr *hdr = pj_pool_calloc(pool, 1, sizeof(*hdr)); 218 pjsip_proxy_authenticate_hdr *hdr; 219 hdr = PJ_POOL_ZALLOC_T(pool, pjsip_proxy_authenticate_hdr); 214 220 init_hdr(hdr, PJSIP_H_PROXY_AUTHENTICATE, &www_authenticate_hdr_vptr); 215 221 pj_list_init(&hdr->challenge.common.other_param); … … 323 329 { 324 330 /* This function also serves Proxy-Authenticate header. */ 325 pjsip_www_authenticate_hdr *hdr = pj_pool_alloc(pool, sizeof(*hdr)); 331 pjsip_www_authenticate_hdr *hdr; 332 hdr = PJ_POOL_ALLOC_T(pool, pjsip_www_authenticate_hdr); 326 333 pj_memcpy(hdr, rhs, sizeof(*hdr)); 327 334 pjsip_param_shallow_clone(pool, &hdr->challenge.common.other_param,
Note: See TracChangeset
for help on using the changeset viewer.