Changeset 1266 for pjproject/trunk/pjsip/src/pjsip-ua/sip_reg.c
- Timestamp:
- May 11, 2007 3:14:34 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsip-ua/sip_reg.c
r974 r1266 104 104 PJ_ASSERT_RETURN(pool != NULL, PJ_ENOMEM); 105 105 106 regc = pj_pool_zalloc(pool, sizeof(struct pjsip_regc));106 regc = PJ_POOL_ZALLOC_T(pool, pjsip_regc); 107 107 108 108 regc->pool = pool; … … 110 110 regc->token = token; 111 111 regc->cb = cb; 112 regc->contact_buf = pj_pool_alloc(pool, PJSIP_REGC_CONTACT_BUF_SIZE);112 regc->contact_buf = (char*)pj_pool_alloc(pool, PJSIP_REGC_CONTACT_BUF_SIZE); 113 113 regc->expires = PJSIP_REGC_EXPIRATION_NOT_SPECIFIED; 114 114 … … 387 387 const pjsip_route_hdr *route; 388 388 389 route_pos = pjsip_msg_find_hdr(tdata->msg, PJSIP_H_VIA, NULL); 389 route_pos = (pjsip_hdr*) 390 pjsip_msg_find_hdr(tdata->msg, PJSIP_H_VIA, NULL); 390 391 if (!route_pos) 391 392 route_pos = &tdata->msg->hdr; … … 393 394 route = regc->route_set.next; 394 395 while (route != ®c->route_set) { 395 pjsip_hdr *new_hdr = pjsip_hdr_shallow_clone(tdata->pool, route); 396 pjsip_hdr *new_hdr = (pjsip_hdr*) 397 pjsip_hdr_shallow_clone(tdata->pool, route); 396 398 pj_list_insert_after(route_pos, new_hdr); 397 399 route_pos = new_hdr; … … 406 408 hdr = regc->hdr_list.next; 407 409 while (hdr != ®c->hdr_list) { 408 pjsip_hdr *new_hdr = pjsip_hdr_shallow_clone(tdata->pool, hdr); 410 pjsip_hdr *new_hdr = (pjsip_hdr*) 411 pjsip_hdr_shallow_clone(tdata->pool, hdr); 409 412 pjsip_msg_add_hdr(tdata->msg, new_hdr); 410 413 hdr = hdr->next; … … 433 436 /* Add Contact header. */ 434 437 msg = tdata->msg; 435 pjsip_msg_add_hdr(msg, pjsip_hdr_shallow_clone(tdata->pool, 438 pjsip_msg_add_hdr(msg, (pjsip_hdr*) 439 pjsip_hdr_shallow_clone(tdata->pool, 436 440 regc->contact_hdr)); 437 441 if (regc->expires_hdr) 438 pjsip_msg_add_hdr(msg, pjsip_hdr_shallow_clone(tdata->pool, 442 pjsip_msg_add_hdr(msg, (pjsip_hdr*) 443 pjsip_hdr_shallow_clone(tdata->pool, 439 444 regc->expires_hdr)); 440 445 … … 471 476 472 477 msg = tdata->msg; 473 pjsip_msg_add_hdr(msg, pjsip_hdr_shallow_clone(tdata->pool, 478 pjsip_msg_add_hdr(msg, (pjsip_hdr*) 479 pjsip_hdr_shallow_clone(tdata->pool, 474 480 regc->contact_hdr)); 475 481 pjsip_msg_add_hdr( msg, (pjsip_hdr*)regc->unreg_expires_hdr); … … 554 560 struct pj_timer_entry *entry) 555 561 { 556 pjsip_regc *regc = entry->user_data;562 pjsip_regc *regc = (pjsip_regc*) entry->user_data; 557 563 pjsip_tx_data *tdata; 558 564 pj_status_t status; … … 588 594 { 589 595 pj_status_t status; 590 pjsip_regc *regc = token;596 pjsip_regc *regc = (pjsip_regc*) token; 591 597 pjsip_transaction *tsx = event->body.tsx_state.tsx; 592 598 … … 654 660 rdata = event->body.tsx_state.src.rdata; 655 661 msg = rdata->msg_info.msg; 656 hdr = pjsip_msg_find_hdr( msg, PJSIP_H_CONTACT, NULL); 662 hdr = (pjsip_contact_hdr*) 663 pjsip_msg_find_hdr( msg, PJSIP_H_CONTACT, NULL); 657 664 while (hdr) { 658 665 contact[contact_cnt++] = hdr; … … 660 667 if (hdr == (void*)&msg->hdr) 661 668 break; 662 hdr = pjsip_msg_find_hdr(msg, PJSIP_H_CONTACT, hdr); 669 hdr = (pjsip_contact_hdr*) 670 pjsip_msg_find_hdr(msg, PJSIP_H_CONTACT, hdr); 663 671 } 664 672 665 expires = pjsip_msg_find_hdr(msg, PJSIP_H_EXPIRES, NULL); 673 expires = (pjsip_expires_hdr*) 674 pjsip_msg_find_hdr(msg, PJSIP_H_EXPIRES, NULL); 666 675 667 676 if (expires) … … 741 750 /* Increment CSeq */ 742 751 cseq = ++regc->cseq_hdr->cseq; 743 cseq_hdr = pjsip_msg_find_hdr(tdata->msg, PJSIP_H_CSEQ, NULL); 752 cseq_hdr = (pjsip_cseq_hdr*) 753 pjsip_msg_find_hdr(tdata->msg, PJSIP_H_CSEQ, NULL); 744 754 cseq_hdr->cseq = cseq; 745 755
Note: See TracChangeset
for help on using the changeset viewer.