Ignore:
Timestamp:
May 11, 2007 3:14:34 PM (17 years ago)
Author:
bennylp
Message:

HUGE changeset to make the rest of the libraries compile with C++ mode

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_acc.c

    r1242 r1266  
    3838PJ_DEF(pj_bool_t) pjsua_acc_is_valid(pjsua_acc_id acc_id) 
    3939{ 
    40     return acc_id>=0 && acc_id<PJ_ARRAY_SIZE(pjsua_var.acc) && 
     40    return acc_id>=0 && acc_id<(int)PJ_ARRAY_SIZE(pjsua_var.acc) && 
    4141           pjsua_var.acc[acc_id].valid; 
    4242} 
     
    186186        pj_strdup_with_null(pjsua_var.pool, &tmp,  
    187187                            &pjsua_var.ua_cfg.outbound_proxy[i]); 
    188         r = pjsip_parse_hdr(pjsua_var.pool, &hname, tmp.ptr, tmp.slen, NULL); 
     188        r = (pjsip_route_hdr*) 
     189            pjsip_parse_hdr(pjsua_var.pool, &hname, tmp.ptr, tmp.slen, NULL); 
    189190        if (r == NULL) { 
    190191            pjsua_perror(THIS_FILE, "Invalid outbound proxy URI", 
     
    201202 
    202203        pj_strdup_with_null(pjsua_var.pool, &tmp, &acc_cfg->proxy[i]); 
    203         r = pjsip_parse_hdr(pjsua_var.pool, &hname, tmp.ptr, tmp.slen, NULL); 
     204        r = (pjsip_route_hdr*) 
     205            pjsip_parse_hdr(pjsua_var.pool, &hname, tmp.ptr, tmp.slen, NULL); 
    204206        if (r == NULL) { 
    205207            pjsua_perror(THIS_FILE, "Invalid URI in account route set", 
     
    323325 
    324326    /* ID must be valid */ 
    325     PJ_ASSERT_RETURN(tid>=0 && tid<PJ_ARRAY_SIZE(pjsua_var.tpdata), PJ_EINVAL); 
     327    PJ_ASSERT_RETURN(tid>=0 && tid<(int)PJ_ARRAY_SIZE(pjsua_var.tpdata),  
     328                     PJ_EINVAL); 
    326329 
    327330    /* Transport must be valid */ 
     
    434437{ 
    435438 
    436     pjsua_acc *acc = param->token; 
     439    pjsua_acc *acc = (pjsua_acc*) param->token; 
    437440 
    438441    PJSUA_LOCK(); 
     
    817820    } 
    818821 
    819     sip_uri = pjsip_uri_get_uri(uri); 
     822    sip_uri = (pjsip_sip_uri*) pjsip_uri_get_uri(uri); 
    820823 
    821824    /* Find matching domain AND port */ 
     
    955958    r = acc->route_set.next; 
    956959    while (r != &acc->route_set) { 
    957         pjsip_msg_add_hdr(tdata->msg, pjsip_hdr_clone(tdata->pool, r)); 
     960        pjsip_msg_add_hdr(tdata->msg,  
     961                          (pjsip_hdr*)pjsip_hdr_clone(tdata->pool, r)); 
    958962        r = r->next; 
    959963    } 
     
    10371041 
    10381042    /* Create the contact header */ 
    1039     contact->ptr = pj_pool_alloc(pool, PJSIP_MAX_URL_SIZE); 
     1043    contact->ptr = (char*)pj_pool_alloc(pool, PJSIP_MAX_URL_SIZE); 
    10401044    contact->slen = pj_ansi_snprintf(contact->ptr, PJSIP_MAX_URL_SIZE, 
    10411045                                     "%.*s%s<%s:%.*s%s%.*s:%d;transport=%s>", 
     
    10981102 
    10991103        /* Otherwise URI is Contact URI */ 
    1100         h_contact = pjsip_msg_find_hdr(rdata->msg_info.msg, PJSIP_H_CONTACT, 
     1104        h_contact = (pjsip_contact_hdr*) 
     1105                    pjsip_msg_find_hdr(rdata->msg_info.msg, PJSIP_H_CONTACT, 
    11011106                                       NULL); 
    11021107        if (h_contact) 
    1103             uri = pjsip_uri_get_uri(h_contact->uri); 
     1108            uri = (pjsip_uri*) pjsip_uri_get_uri(h_contact->uri); 
    11041109         
    11051110 
     
    11081113         */ 
    11091114        if (uri == NULL) 
    1110             uri = pjsip_uri_get_uri(rdata->msg_info.from->uri); 
     1115            uri = (pjsip_uri*) pjsip_uri_get_uri(rdata->msg_info.from->uri); 
    11111116 
    11121117 
     
    11431148 
    11441149    /* Create the contact header */ 
    1145     contact->ptr = pj_pool_alloc(pool, PJSIP_MAX_URL_SIZE); 
     1150    contact->ptr = (char*) pj_pool_alloc(pool, PJSIP_MAX_URL_SIZE); 
    11461151    contact->slen = pj_ansi_snprintf(contact->ptr, PJSIP_MAX_URL_SIZE, 
    11471152                                     "%.*s%s<%s:%.*s%s%.*s:%d;transport=%s>", 
     
    11701175    acc = &pjsua_var.acc[acc_id]; 
    11711176 
    1172     PJ_ASSERT_RETURN(tp_id >= 0 && tp_id < PJ_ARRAY_SIZE(pjsua_var.tpdata), 
     1177    PJ_ASSERT_RETURN(tp_id >= 0 && tp_id < (int)PJ_ARRAY_SIZE(pjsua_var.tpdata), 
    11731178                     PJ_EINVAL); 
    11741179     
Note: See TracChangeset for help on using the changeset viewer.