Changeset 65 for pjproject/trunk/pjsip/src/pjsip/sip_auth_msg.c
- Timestamp:
- Nov 21, 2005 1:55:47 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsip/sip_auth_msg.c
- Property svn:eol-style set to native
r51 r65 48 48 pjsip_authorization_hdr *hdr = pj_pool_calloc(pool, 1, sizeof(*hdr)); 49 49 init_hdr(hdr, PJSIP_H_AUTHORIZATION, &authorization_hdr_vptr); 50 pj_list_init(&hdr->credential.common.other_param); 50 51 return hdr; 51 52 } … … 55 56 pjsip_proxy_authorization_hdr *hdr = pj_pool_calloc(pool, 1, sizeof(*hdr)); 56 57 init_hdr(hdr, PJSIP_H_PROXY_AUTHORIZATION, &authorization_hdr_vptr); 58 pj_list_init(&hdr->credential.common.other_param); 57 59 return hdr; 58 60 } … … 77 79 copy_advance_pair(buf, ", qop=", 6, cred->qop); 78 80 copy_advance_pair(buf, ", nc=", 5, cred->nc); 79 copy_advance(buf, cred->other_param); 81 82 printed = pjsip_param_print_on(&cred->other_param, buf, endbuf-buf, ','); 83 if (printed < 0) 84 return -1; 85 buf += printed; 80 86 81 87 return (int) (buf-startbuf); … … 148 154 pj_strdup(pool, &hdr->credential.digest.qop, &rhs->credential.digest.qop); 149 155 pj_strdup(pool, &hdr->credential.digest.nc, &rhs->credential.digest.nc); 150 pj _strdup(pool, &hdr->credential.digest.other_param, &rhs->credential.digest.other_param);156 pjsip_param_clone(pool, &hdr->credential.digest.other_param, &rhs->credential.digest.other_param); 151 157 } else if (pj_stricmp2(&hdr->scheme, "pgp") == 0) { 152 158 pj_assert(0); … … 166 172 pjsip_authorization_hdr *hdr = pj_pool_alloc(pool, sizeof(*hdr)); 167 173 pj_memcpy(hdr, rhs, sizeof(*hdr)); 174 pjsip_param_shallow_clone(pool, &hdr->credential.common.other_param, 175 &rhs->credential.common.other_param); 168 176 return hdr; 169 177 } … … 193 201 pjsip_www_authenticate_hdr *hdr = pj_pool_calloc(pool, 1, sizeof(*hdr)); 194 202 init_hdr(hdr, PJSIP_H_WWW_AUTHENTICATE, &www_authenticate_hdr_vptr); 203 pj_list_init(&hdr->challenge.common.other_param); 195 204 return hdr; 196 205 } … … 201 210 pjsip_proxy_authenticate_hdr *hdr = pj_pool_calloc(pool, 1, sizeof(*hdr)); 202 211 init_hdr(hdr, PJSIP_H_PROXY_AUTHENTICATE, &www_authenticate_hdr_vptr); 212 pj_list_init(&hdr->challenge.common.other_param); 203 213 return hdr; 204 214 } … … 221 231 copy_advance_pair(buf, ",algorithm=", 11, chal->algorithm); 222 232 copy_advance_pair_quote_cond(buf, ",qop=", 5, chal->qop, '"', '"'); 223 copy_advance(buf, chal->other_param); 233 234 printed = pjsip_param_print_on(&chal->other_param, buf, endbuf-buf, ','); 235 if (printed < 0) 236 return -1; 237 buf += printed; 224 238 225 239 return (int)(buf-startbuf); … … 286 300 pj_strdup(pool, &hdr->challenge.digest.algorithm, &rhs->challenge.digest.algorithm); 287 301 pj_strdup(pool, &hdr->challenge.digest.qop, &rhs->challenge.digest.qop); 288 pj_strdup(pool, &hdr->challenge.digest.other_param, &rhs->challenge.digest.other_param); 302 pjsip_param_clone(pool, &hdr->challenge.digest.other_param, 303 &rhs->challenge.digest.other_param); 289 304 } else if (pj_stricmp2(&hdr->scheme, "pgp") == 0) { 290 305 pj_assert(0); … … 305 320 pjsip_www_authenticate_hdr *hdr = pj_pool_alloc(pool, sizeof(*hdr)); 306 321 pj_memcpy(hdr, rhs, sizeof(*hdr)); 307 return hdr; 308 } 309 310 322 pjsip_param_shallow_clone(pool, &hdr->challenge.common.other_param, 323 &rhs->challenge.common.other_param); 324 return hdr; 325 } 326 327
Note: See TracChangeset
for help on using the changeset viewer.