Ignore:
Timestamp:
Oct 29, 2006 6:13:13 PM (17 years ago)
Author:
bennylp
Message:

Another Symbian commit, ported all PJSIP libraries and sipstateless runs without crashes (still no SIP message though)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/symbian/pjsip/src/pjsip/sip_auth_client.c

    r401 r789  
    213213     
    214214    /* Allocate memory. */ 
    215     cred->response.ptr = pj_pool_alloc(pool, PJSIP_MD5STRLEN); 
     215    cred->response.ptr = (char*)pj_pool_alloc(pool, PJSIP_MD5STRLEN); 
    216216    cred->response.slen = PJSIP_MD5STRLEN; 
    217217 
     
    228228         */ 
    229229        cred->qop = pjsip_AUTH_STR; 
    230         cred->nc.ptr = pj_pool_alloc(pool, 16); 
     230        cred->nc.ptr = (char*)pj_pool_alloc(pool, 16); 
    231231        pj_ansi_snprintf(cred->nc.ptr, 16, "%06u", nc); 
    232232 
     
    266266    if (cached_auth->cnonce.slen == 0) { 
    267267        /* 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); 
    269270 
    270271        /* Create cnonce */ 
     
    366367    sess->endpt = (pjsip_endpoint*)rhs->endpt; 
    367368    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,  
    369370                                    sess->cred_cnt*sizeof(pjsip_cred_info)); 
    370371    for (i=0; i<rhs->cred_cnt; ++i) { 
     
    401402    } else { 
    402403        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)); 
    404406        for (i=0; i<cred_cnt; ++i) { 
    405407            sess->cred_info[i].data_type = c[i].data_type; 
     
    527529                cached_hdr->hdr = hauth; 
    528530            } 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)); 
    530533                pjsip_method_copy( pool, &cached_hdr->method, method); 
    531534                cached_hdr->hdr = hauth; 
     
    536539#       if defined(PJSIP_AUTH_AUTO_SEND_NEXT) && PJSIP_AUTH_AUTO_SEND_NEXT!=0 
    537540            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); 
    539543            } 
    540544#       endif 
     
    609613                    if (pjsip_method_cmp(&entry->method, method)==0) { 
    610614                        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); 
    612617                        pjsip_msg_add_hdr(tdata->msg, (pjsip_hdr*)hauth); 
    613618                    } else { 
     
    795800        cached_auth = find_cached_auth(sess, &hchal->challenge.common.realm ); 
    796801        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)); 
    798804            pj_strdup( sess->pool, &cached_auth->realm, &hchal->challenge.common.realm); 
    799805            cached_auth->is_proxy = (hchal->type == PJSIP_H_PROXY_AUTHENTICATE); 
     
    823829 
    824830    /* 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); 
    826833    via->branch_param.slen = 0; 
    827834 
Note: See TracChangeset for help on using the changeset viewer.