Ignore:
Timestamp:
May 2, 2007 5:14:29 AM (17 years ago)
Author:
bennylp
Message:

Ported PJSIP and PJSIP-SIMPLE to Symbian

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsip/sip_transaction.c

    r1210 r1241  
    289289                   9 +                      /* Via port. */ 
    290290                   16;                      /* Separator+Allowance. */ 
    291     key = p = pj_pool_alloc(pool, len_required); 
     291    key = p = (char*) pj_pool_alloc(pool, len_required); 
    292292    end = p + len_required; 
    293293 
     
    356356    PJ_ASSERT_RETURN(pool && key && method && branch, PJ_EINVAL); 
    357357 
    358     p = key->ptr = pj_pool_alloc(pool, branch->slen + method->name.slen + 4 ); 
     358    p = key->ptr = (char*)  
     359                   pj_pool_alloc(pool, branch->slen + method->name.slen + 4 ); 
    359360     
    360361    /* Add role. */ 
     
    594595 
    595596    pj_mutex_lock(mod_tsx_layer.mutex); 
    596     tsx = pj_hash_get( mod_tsx_layer.htable, key->ptr, key->slen, &hval ); 
     597    tsx = (pjsip_transaction*) 
     598          pj_hash_get( mod_tsx_layer.htable, key->ptr, key->slen, &hval ); 
    597599    pj_mutex_unlock(mod_tsx_layer.mutex); 
    598600 
     
    645647    it = pj_hash_first(mod_tsx_layer.htable, &it_buf); 
    646648    while (it) { 
    647         pjsip_transaction *tsx = pj_hash_this(mod_tsx_layer.htable, it); 
     649        pjsip_transaction *tsx = (pjsip_transaction*)  
     650                                 pj_hash_this(mod_tsx_layer.htable, it); 
    648651        pj_hash_iterator_t *next = pj_hash_next(mod_tsx_layer.htable, it); 
    649652        if (tsx) { 
     
    706709    pj_mutex_lock( mod_tsx_layer.mutex ); 
    707710 
    708     tsx = pj_hash_get( mod_tsx_layer.htable, key.ptr, key.slen, &hval ); 
     711    tsx = (pjsip_transaction*)  
     712          pj_hash_get( mod_tsx_layer.htable, key.ptr, key.slen, &hval ); 
    709713 
    710714 
     
    754758    pj_mutex_lock( mod_tsx_layer.mutex ); 
    755759 
    756     tsx = pj_hash_get( mod_tsx_layer.htable, key.ptr, key.slen, &hval ); 
     760    tsx = (pjsip_transaction*)  
     761          pj_hash_get( mod_tsx_layer.htable, key.ptr, key.slen, &hval ); 
    757762 
    758763 
     
    792797PJ_DEF(pjsip_transaction*) pjsip_rdata_get_tsx( pjsip_rx_data *rdata ) 
    793798{ 
    794     return rdata->endpt_info.mod_data[mod_tsx_layer.mod.id]; 
     799    return (pjsip_transaction*)  
     800           rdata->endpt_info.mod_data[mod_tsx_layer.mod.id]; 
    795801} 
    796802 
     
    817823        } else { 
    818824            while (it != NULL) { 
    819                 pjsip_transaction *tsx = pj_hash_this(mod_tsx_layer.htable,it); 
     825                pjsip_transaction *tsx = (pjsip_transaction*)  
     826                                         pj_hash_this(mod_tsx_layer.htable,it); 
    820827 
    821828                PJ_LOG(3, (THIS_FILE, " %s %s|%d|%s", 
     
    895902        return PJ_ENOMEM; 
    896903 
    897     tsx = pj_pool_zalloc(pool, sizeof(pjsip_transaction)); 
     904    tsx = PJ_POOL_ZALLOC_T(pool, pjsip_transaction); 
    898905    tsx->pool = pool; 
    899906    tsx->tsx_user = tsx_user; 
     
    966973 
    967974    /* Clear TLS, so that mutex will not be unlocked */ 
    968     lck = pj_thread_local_get(pjsip_tsx_lock_tls_id); 
     975    lck = (struct tsx_lock_data*) pj_thread_local_get(pjsip_tsx_lock_tls_id); 
    969976    while (lck) { 
    970977        if (lck->tsx == tsx) { 
     
    990997{ 
    991998    pjsip_event event; 
    992     pjsip_transaction *tsx = entry->user_data; 
     999    pjsip_transaction *tsx = (pjsip_transaction*) entry->user_data; 
    9931000    struct tsx_lock_data lck; 
    9941001 
     
    10431050     */ 
    10441051    if (event_src_type==PJSIP_EVENT_RX_MSG && tsx->tsx_user) { 
    1045         pjsip_rx_data *rdata = event_src; 
     1052        pjsip_rx_data *rdata = (pjsip_rx_data*) event_src; 
    10461053 
    10471054        pj_assert(rdata != NULL); 
     
    11241131 
    11251132    /* Make sure CSeq header is present. */ 
    1126     cseq = pjsip_msg_find_hdr(msg, PJSIP_H_CSEQ, NULL); 
     1133    cseq = (pjsip_cseq_hdr*) pjsip_msg_find_hdr(msg, PJSIP_H_CSEQ, NULL); 
    11271134    if (!cseq) { 
    11281135        pj_assert(!"CSeq header not present in outgoing message!"); 
     
    11501157 
    11511158    /* Generate Via header if it doesn't exist. */ 
    1152     via = pjsip_msg_find_hdr(msg, PJSIP_H_VIA, NULL); 
     1159    via = (pjsip_via_hdr*) pjsip_msg_find_hdr(msg, PJSIP_H_VIA, NULL); 
    11531160    if (via == NULL) { 
    11541161        via = pjsip_via_hdr_create(tdata->pool); 
     
    11591166    if (via->branch_param.slen == 0) { 
    11601167        pj_str_t tmp; 
    1161         via->branch_param.ptr = pj_pool_alloc(tsx->pool, PJSIP_MAX_BRANCH_LEN); 
     1168        via->branch_param.ptr = (char*) 
     1169                                pj_pool_alloc(tsx->pool, PJSIP_MAX_BRANCH_LEN); 
    11621170        via->branch_param.slen = PJSIP_MAX_BRANCH_LEN; 
    11631171        pj_memcpy(via->branch_param.ptr, PJSIP_RFC3261_BRANCH_ID,  
     
    15101518                               pj_ssize_t sent, pj_bool_t *cont ) 
    15111519{ 
    1512     pjsip_transaction *tsx = send_state->token; 
     1520    pjsip_transaction *tsx = (pjsip_transaction*) send_state->token; 
    15131521    struct tsx_lock_data lck; 
    15141522 
     
    16301638{ 
    16311639    if (sent < 0) { 
    1632         pjsip_transaction *tsx = token; 
     1640        pjsip_transaction *tsx = (pjsip_transaction*) token; 
    16331641        struct tsx_lock_data lck; 
    16341642        char errmsg[PJ_ERR_MSG_SIZE]; 
     
    22742282             */ 
    22752283            if (!tsx->is_reliable) { 
    2276                 pjsip_cseq_hdr *cseq = pjsip_msg_find_hdr( msg, PJSIP_H_CSEQ, 
     2284                pjsip_cseq_hdr *cseq = (pjsip_cseq_hdr*) 
     2285                                       pjsip_msg_find_hdr( msg, PJSIP_H_CSEQ, 
    22772286                                                           NULL); 
    22782287                if (cseq->method.id == PJSIP_INVITE_METHOD) { 
Note: See TracChangeset for help on using the changeset viewer.