Changeset 789 for pjproject/branches/symbian/pjsip/src/pjsip/sip_dialog.c
- Timestamp:
- Oct 29, 2006 6:13:13 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/symbian/pjsip/src/pjsip/sip_dialog.c
r446 r789 70 70 return PJ_ENOMEM; 71 71 72 dlg = pj_pool_zalloc(pool, sizeof(pjsip_dialog));72 dlg = (pjsip_dialog*)pj_pool_zalloc(pool, sizeof(pjsip_dialog)); 73 73 PJ_ASSERT_RETURN(dlg != NULL, PJ_ENOMEM); 74 74 … … 145 145 pjsip_hdr *hdr; 146 146 147 hdr = pjsip_parse_hdr(dlg->pool, ¶m->name, param->value.ptr, 147 hdr = (pjsip_hdr *) 148 pjsip_parse_hdr(dlg->pool, ¶m->name, param->value.ptr, 148 149 param->value.slen, NULL); 149 150 if (hdr == NULL) { … … 290 291 * both local and remote URI. 291 292 */ 292 tmp.ptr = pj_pool_alloc(rdata->tp_info.pool, TMP_LEN);293 tmp.ptr = (char*)pj_pool_alloc(rdata->tp_info.pool, TMP_LEN); 293 294 294 295 /* Init local info from the To header. */ 295 dlg->local.info = pjsip_hdr_clone(dlg->pool, rdata->msg_info.to); 296 dlg->local.info = (pjsip_to_hdr*) 297 pjsip_hdr_clone(dlg->pool, rdata->msg_info.to); 296 298 pjsip_fromto_hdr_set_from(dlg->local.info); 297 299 … … 348 350 349 351 /* Init remote info from the From header. */ 350 dlg->remote.info = pjsip_hdr_clone(dlg->pool, rdata->msg_info.from); 352 dlg->remote.info = (pjsip_from_hdr*) 353 pjsip_hdr_clone(dlg->pool, rdata->msg_info.from); 351 354 pjsip_fromto_hdr_set_to(dlg->remote.info); 352 355 … … 365 368 366 369 /* Init remote's contact from Contact header. */ 367 contact_hdr = pjsip_msg_find_hdr(rdata->msg_info.msg, PJSIP_H_CONTACT, 370 contact_hdr = (pjsip_hdr*) 371 pjsip_msg_find_hdr(rdata->msg_info.msg, PJSIP_H_CONTACT, 368 372 NULL); 369 373 if (!contact_hdr) { … … 371 375 goto on_error; 372 376 } 373 dlg->remote.contact = pjsip_hdr_clone(dlg->pool, contact_hdr); 377 dlg->remote.contact = (pjsip_contact_hdr*) 378 pjsip_hdr_clone(dlg->pool, contact_hdr); 374 379 375 380 /* Init remote's CSeq from CSeq header */ … … 391 396 392 397 /* Call-ID */ 393 dlg->call_id = pjsip_hdr_clone(dlg->pool, rdata->msg_info.cid); 398 dlg->call_id = (pjsip_cid_hdr*) 399 pjsip_hdr_clone(dlg->pool, rdata->msg_info.cid); 394 400 395 401 /* Route set. … … 406 412 407 413 /* Clone the Record-Route, change the type to Route header. */ 408 route = pjsip_hdr_clone(dlg->pool, rr);414 route = (pjsip_route_hdr*)pjsip_hdr_clone(dlg->pool, rr); 409 415 pjsip_routing_hdr_set_route(route); 410 416 … … 416 422 if (rr == (pjsip_rr_hdr*)&rdata->msg_info.msg->hdr) 417 423 break; 418 rr = pjsip_msg_find_hdr(rdata->msg_info.msg, PJSIP_H_RECORD_ROUTE, rr); 424 rr = (pjsip_route_hdr*) 425 pjsip_msg_find_hdr(rdata->msg_info.msg, PJSIP_H_RECORD_ROUTE, rr); 419 426 } 420 427 … … 501 508 502 509 /* Clone remote target. */ 503 dlg->target = pjsip_uri_clone(dlg->pool, first_dlg->target);510 dlg->target = (pjsip_uri*) pjsip_uri_clone(dlg->pool, first_dlg->target); 504 511 505 512 /* Clone local info. */ 506 dlg->local.info = pjsip_hdr_clone(dlg->pool, first_dlg->local.info); 513 dlg->local.info = (pjsip_fromto_hdr*) 514 pjsip_hdr_clone(dlg->pool, first_dlg->local.info); 507 515 508 516 /* Clone local tag. */ … … 515 523 516 524 /* Clone local Contact. */ 517 dlg->local.contact = pjsip_hdr_clone(dlg->pool, first_dlg->local.contact); 525 dlg->local.contact = (pjsip_contact_hdr*) 526 pjsip_hdr_clone(dlg->pool, first_dlg->local.contact); 518 527 519 528 /* Clone remote info. */ 520 dlg->remote.info = pjsip_hdr_clone(dlg->pool, first_dlg->remote.info); 529 dlg->remote.info = (pjsip_fromto_hdr*) 530 pjsip_hdr_clone(dlg->pool, first_dlg->remote.info); 521 531 522 532 /* Set remote tag from the response. */ … … 542 552 543 553 /* Clone Call-ID header. */ 544 dlg->call_id = pjsip_hdr_clone(dlg->pool, first_dlg->call_id); 554 dlg->call_id = (pjsip_cid_hdr*) 555 pjsip_hdr_clone(dlg->pool, first_dlg->call_id); 545 556 546 557 /* Duplicate Route-Set. */ … … 550 561 pjsip_route_hdr *h; 551 562 552 h = pjsip_hdr_clone(dlg->pool, r);563 h = (pjsip_route_hdr*) pjsip_hdr_clone(dlg->pool, r); 553 564 pj_list_push_back(&dlg->route_set, h); 554 565 … … 653 664 pjsip_route_hdr *new_r; 654 665 655 new_r = pjsip_hdr_clone(dlg->pool, r);666 new_r = (pjsip_route_hdr*) pjsip_hdr_clone(dlg->pool, r); 656 667 pj_list_push_back(&dlg->route_set, new_r); 657 668 … … 860 871 for (; route != end_list; route = route->next ) { 861 872 pjsip_route_hdr *r; 862 r = pjsip_hdr_shallow_clone( tdata->pool, route );873 r = (pjsip_route_hdr*) pjsip_hdr_shallow_clone( tdata->pool, route ); 863 874 pjsip_routing_hdr_set_route(r); 864 875 pjsip_msg_add_hdr(tdata->msg, (pjsip_hdr*)r); … … 1041 1052 /* Add contact header only if one is not present. */ 1042 1053 if (pjsip_msg_find_hdr(tdata->msg, PJSIP_H_CONTACT, NULL) == 0) { 1043 hdr = pjsip_hdr_clone(tdata->pool, dlg->local.contact); 1054 hdr = (pjsip_hdr*) 1055 pjsip_hdr_clone(tdata->pool, dlg->local.contact); 1044 1056 pjsip_msg_add_hdr(tdata->msg, hdr); 1045 1057 } … … 1053 1065 PJSIP_H_ALLOW, NULL); 1054 1066 if (c_hdr) { 1055 hdr = pjsip_hdr_clone(tdata->pool, c_hdr);1067 hdr = (pjsip_hdr*) pjsip_hdr_clone(tdata->pool, c_hdr); 1056 1068 pjsip_msg_add_hdr(tdata->msg, hdr); 1057 1069 } … … 1065 1077 PJSIP_H_SUPPORTED, NULL); 1066 1078 if (c_hdr) { 1067 hdr = pjsip_hdr_clone(tdata->pool, c_hdr);1079 hdr = (pjsip_hdr*) pjsip_hdr_clone(tdata->pool, c_hdr); 1068 1080 pjsip_msg_add_hdr(tdata->msg, hdr); 1069 1081 } … … 1238 1250 while (hdr != hdr_list) { 1239 1251 pjsip_msg_add_hdr(tdata->msg, 1240 pjsip_hdr_clone(tdata->pool, hdr));1252 (pjsip_hdr*) pjsip_hdr_clone(tdata->pool, hdr)); 1241 1253 hdr = hdr->next; 1242 1254 } … … 1387 1399 if (hdr->type == PJSIP_H_RECORD_ROUTE) { 1388 1400 pjsip_route_hdr *r; 1389 r = pjsip_hdr_clone(dlg->pool, hdr);1401 r = (pjsip_route_hdr*) pjsip_hdr_clone(dlg->pool, hdr); 1390 1402 pjsip_routing_hdr_set_route(r); 1391 1403 pj_list_push_back(&dlg->route_set, r); … … 1396 1408 * field of the response. 1397 1409 */ 1398 contact = pjsip_msg_find_hdr(rdata->msg_info.msg, PJSIP_H_CONTACT, 1410 contact = (pjsip_contact_hdr*) 1411 pjsip_msg_find_hdr(rdata->msg_info.msg, PJSIP_H_CONTACT, 1399 1412 NULL); 1400 1413 if (contact) { 1401 dlg->remote.contact = pjsip_hdr_clone(dlg->pool, contact); 1414 dlg->remote.contact = (pjsip_contact_hdr*) 1415 pjsip_hdr_clone(dlg->pool, contact); 1402 1416 dlg->target = dlg->remote.contact->uri; 1403 1417 } … … 1414 1428 pjsip_contact_hdr *contact; 1415 1429 1416 contact = pjsip_msg_find_hdr(rdata->msg_info.msg, PJSIP_H_CONTACT, 1430 contact = (pjsip_contact_hdr*) 1431 pjsip_msg_find_hdr(rdata->msg_info.msg, PJSIP_H_CONTACT, 1417 1432 NULL); 1418 1433 if (contact) { 1419 dlg->remote.contact = pjsip_hdr_clone(dlg->pool, contact); 1434 dlg->remote.contact = (pjsip_contact_hdr*) 1435 pjsip_hdr_clone(dlg->pool, contact); 1420 1436 dlg->target = dlg->remote.contact->uri; 1421 1437 }
Note: See TracChangeset
for help on using the changeset viewer.