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_call.c

    r1264 r1266  
    204204    pjsua_acc *acc; 
    205205    pjsua_call *call; 
    206     unsigned call_id; 
     206    int call_id = -1; 
    207207    pj_str_t contact; 
    208208    pjsip_tx_data *tdata; 
     
    211211 
    212212    /* Check that account is valid */ 
    213     PJ_ASSERT_RETURN(acc_id>=0 || acc_id<PJ_ARRAY_SIZE(pjsua_var.acc),  
     213    PJ_ASSERT_RETURN(acc_id>=0 || acc_id<(int)PJ_ARRAY_SIZE(pjsua_var.acc),  
    214214                     PJ_EINVAL); 
    215215 
     
    231231 
    232232    /* Find free call slot. */ 
    233     for (call_id=0; call_id<pjsua_var.ua_cfg.max_calls; ++call_id) { 
     233    for (call_id=0; call_id<(int)pjsua_var.ua_cfg.max_calls; ++call_id) { 
    234234        if (pjsua_var.calls[call_id].inv == NULL) 
    235235            break; 
    236236    } 
    237237 
    238     if (call_id == pjsua_var.ua_cfg.max_calls) { 
     238    if (call_id == (int)pjsua_var.ua_cfg.max_calls) { 
    239239        pjsua_perror(THIS_FILE, "Error making file", PJ_ETOOMANY); 
    240240        PJSUA_UNLOCK(); 
     
    508508 
    509509        /* Get the replaced call instance */ 
    510         replaced_call = replaced_dlg->mod_data[pjsua_var.mod.id]; 
     510        replaced_call = (pjsua_call*) replaced_dlg->mod_data[pjsua_var.mod.id]; 
    511511 
    512512        /* Notify application */ 
     
    691691 
    692692        /* Get the replaced call instance */ 
    693         replaced_call = replaced_dlg->mod_data[pjsua_var.mod.id]; 
     693        replaced_call = (pjsua_call*) replaced_dlg->mod_data[pjsua_var.mod.id]; 
    694694 
    695695        /* Notify application */ 
     
    13781378                      dest_dlg->remote.info->tag.slen + 
    13791379                      dest_dlg->local.info->tag.slen + 32  
    1380                       < sizeof(str_dest_buf), PJSIP_EURITOOLONG); 
     1380                      < (long)sizeof(str_dest_buf), PJSIP_EURITOOLONG); 
    13811381 
    13821382    /* Print URI */ 
     
    13841384    str_dest.slen = 1; 
    13851385 
    1386     uri = pjsip_uri_get_uri(dest_dlg->remote.info->uri); 
     1386    uri = (pjsip_uri*) pjsip_uri_get_uri(dest_dlg->remote.info->uri); 
    13871387    len = pjsip_uri_print(PJSIP_URI_IN_REQ_URI, uri,  
    13881388                          str_dest_buf+1, sizeof(str_dest_buf)-1); 
     
    15101510 
    15111511    /* Create IM data and attach to the request. */ 
    1512     im_data = pj_pool_zalloc(tdata->pool, sizeof(*im_data)); 
     1512    im_data = PJ_POOL_ZALLOC_T(tdata->pool, pjsua_im_data); 
    15131513    im_data->acc_id = call->acc_id; 
    15141514    im_data->call_id = call_id; 
     
    19351935    PJSUA_LOCK(); 
    19361936 
    1937     call = inv->dlg->mod_data[pjsua_var.mod.id]; 
     1937    call = (pjsua_call*) inv->dlg->mod_data[pjsua_var.mod.id]; 
    19381938 
    19391939    if (!call) { 
     
    21052105    PJSUA_LOCK(); 
    21062106 
    2107     call = inv->dlg->mod_data[pjsua_var.mod.id]; 
     2107    call = (pjsua_call*) inv->dlg->mod_data[pjsua_var.mod.id]; 
    21082108 
    21092109    if (status != PJ_SUCCESS) { 
     
    22322232    PJSUA_LOCK(); 
    22332233 
    2234     call = inv->dlg->mod_data[pjsua_var.mod.id]; 
     2234    call = (pjsua_call*) inv->dlg->mod_data[pjsua_var.mod.id]; 
    22352235 
    22362236    /* 
     
    23152315        pjsua_call *call; 
    23162316 
    2317         call = pjsip_evsub_get_mod_data(sub, pjsua_var.mod.id); 
     2317        call = (pjsua_call*) pjsip_evsub_get_mod_data(sub, pjsua_var.mod.id); 
    23182318 
    23192319        /* Must be receipt of response message */ 
     
    23782378        pj_status_t status; 
    23792379 
    2380         call = pjsip_evsub_get_mod_data(sub, pjsua_var.mod.id); 
     2380        call = (pjsua_call*) pjsip_evsub_get_mod_data(sub, pjsua_var.mod.id); 
    23812381 
    23822382        /* When subscription is terminated, clear the xfer_sub member of  
     
    24222422 
    24232423            /* Try to parse the content */ 
    2424             status = pjsip_parse_status_line(body->data, body->len,  
     2424            status = pjsip_parse_status_line((char*)body->data, body->len,  
    24252425                                             &status_line); 
    24262426            if (status != PJ_SUCCESS) { 
     
    24672467        pjsua_call *call; 
    24682468 
    2469         call = pjsip_evsub_get_mod_data(sub, pjsua_var.mod.id); 
     2469        call = (pjsua_call*) pjsip_evsub_get_mod_data(sub, pjsua_var.mod.id); 
    24702470        if (!call) 
    24712471            return; 
     
    25022502    pjsip_evsub *sub; 
    25032503 
    2504     existing_call = inv->dlg->mod_data[pjsua_var.mod.id]; 
     2504    existing_call = (pjsua_call*) inv->dlg->mod_data[pjsua_var.mod.id]; 
    25052505 
    25062506    /* Find the Refer-To header */ 
     
    25292529     * request. 
    25302530     */ 
    2531     ref_by_hdr = pjsip_msg_find_hdr_by_name(rdata->msg_info.msg, &str_ref_by,  
     2531    ref_by_hdr = (pjsip_hdr*) 
     2532                 pjsip_msg_find_hdr_by_name(rdata->msg_info.msg, &str_ref_by,  
    25322533                                            NULL); 
    25332534 
     
    26562657     */ 
    26572658    if (ref_by_hdr != NULL) { 
    2658         pjsip_hdr *dup = pjsip_hdr_clone(rdata->tp_info.pool, ref_by_hdr); 
     2659        pjsip_hdr *dup = (pjsip_hdr*) 
     2660                         pjsip_hdr_clone(rdata->tp_info.pool, ref_by_hdr); 
    26592661        pj_list_push_back(&msg_data.hdr_list, dup); 
    26602662    } 
     
    27112713                                            pjsip_event *e) 
    27122714{ 
    2713     pjsua_call *call = inv->dlg->mod_data[pjsua_var.mod.id]; 
     2715    pjsua_call *call = (pjsua_call*) inv->dlg->mod_data[pjsua_var.mod.id]; 
    27142716 
    27152717    PJSUA_LOCK(); 
     
    27732775            pjsua_im_data *im_data; 
    27742776 
    2775             im_data = tsx->mod_data[pjsua_var.mod.id]; 
     2777            im_data = (pjsua_im_data*) tsx->mod_data[pjsua_var.mod.id]; 
    27762778            /* im_data can be NULL if this is typing indication */ 
    27772779 
Note: See TracChangeset for help on using the changeset viewer.