- Timestamp:
- Oct 29, 2006 6:13:13 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/symbian/pjsip/src/pjsip/sip_auth_client.c
r401 r789 213 213 214 214 /* Allocate memory. */ 215 cred->response.ptr = pj_pool_alloc(pool, PJSIP_MD5STRLEN);215 cred->response.ptr = (char*)pj_pool_alloc(pool, PJSIP_MD5STRLEN); 216 216 cred->response.slen = PJSIP_MD5STRLEN; 217 217 … … 228 228 */ 229 229 cred->qop = pjsip_AUTH_STR; 230 cred->nc.ptr = pj_pool_alloc(pool, 16);230 cred->nc.ptr = (char*)pj_pool_alloc(pool, 16); 231 231 pj_ansi_snprintf(cred->nc.ptr, 16, "%06u", nc); 232 232 … … 266 266 if (cached_auth->cnonce.slen == 0) { 267 267 /* Save the whole challenge */ 268 cached_auth->last_chal = pjsip_hdr_clone(ses_pool, hdr); 268 cached_auth->last_chal = (pjsip_www_authenticate_hdr*) 269 pjsip_hdr_clone(ses_pool, hdr); 269 270 270 271 /* Create cnonce */ … … 366 367 sess->endpt = (pjsip_endpoint*)rhs->endpt; 367 368 sess->cred_cnt = rhs->cred_cnt; 368 sess->cred_info = pj_pool_alloc(pool,369 sess->cred_info = (pjsip_cred_info*) pj_pool_alloc(pool, 369 370 sess->cred_cnt*sizeof(pjsip_cred_info)); 370 371 for (i=0; i<rhs->cred_cnt; ++i) { … … 401 402 } else { 402 403 int i; 403 sess->cred_info = pj_pool_alloc(sess->pool, cred_cnt * sizeof(*c)); 404 sess->cred_info = (pjsip_cred_info*) 405 pj_pool_alloc(sess->pool, cred_cnt * sizeof(*c)); 404 406 for (i=0; i<cred_cnt; ++i) { 405 407 sess->cred_info[i].data_type = c[i].data_type; … … 527 529 cached_hdr->hdr = hauth; 528 530 } else { 529 cached_hdr = pj_pool_alloc(pool, sizeof(*cached_hdr)); 531 cached_hdr = (pjsip_cached_auth_hdr*) 532 pj_pool_alloc(pool, sizeof(*cached_hdr)); 530 533 pjsip_method_copy( pool, &cached_hdr->method, method); 531 534 cached_hdr->hdr = hauth; … … 536 539 # if defined(PJSIP_AUTH_AUTO_SEND_NEXT) && PJSIP_AUTH_AUTO_SEND_NEXT!=0 537 540 if (hdr != cached_auth->last_chal) { 538 cached_auth->last_chal = pjsip_hdr_clone(sess_pool, hdr); 541 cached_auth->last_chal = (pjsip_www_authenticate_hdr*) 542 pjsip_hdr_clone(sess_pool, hdr); 539 543 } 540 544 # endif … … 609 613 if (pjsip_method_cmp(&entry->method, method)==0) { 610 614 pjsip_authorization_hdr *hauth; 611 hauth = pjsip_hdr_shallow_clone(tdata->pool, entry->hdr); 615 hauth=(pjsip_authorization_hdr*) 616 pjsip_hdr_shallow_clone(tdata->pool, entry->hdr); 612 617 pjsip_msg_add_hdr(tdata->msg, (pjsip_hdr*)hauth); 613 618 } else { … … 795 800 cached_auth = find_cached_auth(sess, &hchal->challenge.common.realm ); 796 801 if (!cached_auth) { 797 cached_auth = pj_pool_zalloc( sess->pool, sizeof(*cached_auth)); 802 cached_auth = (pjsip_cached_auth *) 803 pj_pool_zalloc( sess->pool, sizeof(*cached_auth)); 798 804 pj_strdup( sess->pool, &cached_auth->realm, &hchal->challenge.common.realm); 799 805 cached_auth->is_proxy = (hchal->type == PJSIP_H_PROXY_AUTHENTICATE); … … 823 829 824 830 /* Remove branch param in Via header. */ 825 via = pjsip_msg_find_hdr(tdata->msg, PJSIP_H_VIA, NULL); 831 via = (pjsip_via_hdr*) 832 pjsip_msg_find_hdr(tdata->msg, PJSIP_H_VIA, NULL); 826 833 via->branch_param.slen = 0; 827 834
Note: See TracChangeset
for help on using the changeset viewer.