Changeset 1266 for pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c
- Timestamp:
- May 11, 2007 3:14:34 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c
r1264 r1266 204 204 pjsua_acc *acc; 205 205 pjsua_call *call; 206 unsigned call_id;206 int call_id = -1; 207 207 pj_str_t contact; 208 208 pjsip_tx_data *tdata; … … 211 211 212 212 /* 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), 214 214 PJ_EINVAL); 215 215 … … 231 231 232 232 /* 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) { 234 234 if (pjsua_var.calls[call_id].inv == NULL) 235 235 break; 236 236 } 237 237 238 if (call_id == pjsua_var.ua_cfg.max_calls) {238 if (call_id == (int)pjsua_var.ua_cfg.max_calls) { 239 239 pjsua_perror(THIS_FILE, "Error making file", PJ_ETOOMANY); 240 240 PJSUA_UNLOCK(); … … 508 508 509 509 /* 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]; 511 511 512 512 /* Notify application */ … … 691 691 692 692 /* 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]; 694 694 695 695 /* Notify application */ … … 1378 1378 dest_dlg->remote.info->tag.slen + 1379 1379 dest_dlg->local.info->tag.slen + 32 1380 < sizeof(str_dest_buf), PJSIP_EURITOOLONG);1380 < (long)sizeof(str_dest_buf), PJSIP_EURITOOLONG); 1381 1381 1382 1382 /* Print URI */ … … 1384 1384 str_dest.slen = 1; 1385 1385 1386 uri = pjsip_uri_get_uri(dest_dlg->remote.info->uri);1386 uri = (pjsip_uri*) pjsip_uri_get_uri(dest_dlg->remote.info->uri); 1387 1387 len = pjsip_uri_print(PJSIP_URI_IN_REQ_URI, uri, 1388 1388 str_dest_buf+1, sizeof(str_dest_buf)-1); … … 1510 1510 1511 1511 /* 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); 1513 1513 im_data->acc_id = call->acc_id; 1514 1514 im_data->call_id = call_id; … … 1935 1935 PJSUA_LOCK(); 1936 1936 1937 call = inv->dlg->mod_data[pjsua_var.mod.id];1937 call = (pjsua_call*) inv->dlg->mod_data[pjsua_var.mod.id]; 1938 1938 1939 1939 if (!call) { … … 2105 2105 PJSUA_LOCK(); 2106 2106 2107 call = inv->dlg->mod_data[pjsua_var.mod.id];2107 call = (pjsua_call*) inv->dlg->mod_data[pjsua_var.mod.id]; 2108 2108 2109 2109 if (status != PJ_SUCCESS) { … … 2232 2232 PJSUA_LOCK(); 2233 2233 2234 call = inv->dlg->mod_data[pjsua_var.mod.id];2234 call = (pjsua_call*) inv->dlg->mod_data[pjsua_var.mod.id]; 2235 2235 2236 2236 /* … … 2315 2315 pjsua_call *call; 2316 2316 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); 2318 2318 2319 2319 /* Must be receipt of response message */ … … 2378 2378 pj_status_t status; 2379 2379 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); 2381 2381 2382 2382 /* When subscription is terminated, clear the xfer_sub member of … … 2422 2422 2423 2423 /* 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, 2425 2425 &status_line); 2426 2426 if (status != PJ_SUCCESS) { … … 2467 2467 pjsua_call *call; 2468 2468 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); 2470 2470 if (!call) 2471 2471 return; … … 2502 2502 pjsip_evsub *sub; 2503 2503 2504 existing_call = inv->dlg->mod_data[pjsua_var.mod.id];2504 existing_call = (pjsua_call*) inv->dlg->mod_data[pjsua_var.mod.id]; 2505 2505 2506 2506 /* Find the Refer-To header */ … … 2529 2529 * request. 2530 2530 */ 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, 2532 2533 NULL); 2533 2534 … … 2656 2657 */ 2657 2658 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); 2659 2661 pj_list_push_back(&msg_data.hdr_list, dup); 2660 2662 } … … 2711 2713 pjsip_event *e) 2712 2714 { 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]; 2714 2716 2715 2717 PJSUA_LOCK(); … … 2773 2775 pjsua_im_data *im_data; 2774 2776 2775 im_data = tsx->mod_data[pjsua_var.mod.id];2777 im_data = (pjsua_im_data*) tsx->mod_data[pjsua_var.mod.id]; 2776 2778 /* im_data can be NULL if this is typing indication */ 2777 2779
Note: See TracChangeset
for help on using the changeset viewer.