Changeset 2194
- Timestamp:
- Aug 5, 2008 8:14:39 PM (16 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 5 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsip/sip_dialog.c
r2179 r2194 308 308 { 309 309 pj_status_t status; 310 pjsip_hdr *contact_hdr; 310 pjsip_hdr *pos = NULL; 311 pjsip_contact_hdr *contact_hdr; 311 312 pjsip_rr_hdr *rr; 312 313 pjsip_transaction *tsx = NULL; … … 417 418 418 419 419 /* Init remote's contact from Contact header. */ 420 contact_hdr = (pjsip_hdr*) 421 pjsip_msg_find_hdr(rdata->msg_info.msg, PJSIP_H_CONTACT, 422 NULL); 420 /* Init remote's contact from Contact header. 421 * Iterate the Contact URI until we find sip: or sips: scheme. 422 */ 423 do { 424 contact_hdr = (pjsip_contact_hdr*) 425 pjsip_msg_find_hdr(rdata->msg_info.msg, PJSIP_H_CONTACT, 426 pos); 427 if (contact_hdr) { 428 if (!PJSIP_URI_SCHEME_IS_SIP(contact_hdr->uri) && 429 !PJSIP_URI_SCHEME_IS_SIPS(contact_hdr->uri)) 430 { 431 pos = (pjsip_hdr*)contact_hdr->next; 432 if (pos == &rdata->msg_info.msg->hdr) 433 contact_hdr = NULL; 434 } else { 435 break; 436 } 437 } 438 } while (contact_hdr); 439 423 440 if (!contact_hdr) { 424 441 status = PJSIP_ERRNO_FROM_SIP_STATUS(PJSIP_SC_BAD_REQUEST); 425 442 goto on_error; 426 443 } 444 427 445 dlg->remote.contact = (pjsip_contact_hdr*) 428 pjsip_hdr_clone(dlg->pool, contact_hdr);446 pjsip_hdr_clone(dlg->pool, (pjsip_hdr*)contact_hdr); 429 447 430 448 /* Init remote's CSeq from CSeq header */ -
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_acc.c
r2162 r2194 1675 1675 pjsip_uri_get_uri(rdata->msg_info.record_route->name_addr.uri); 1676 1676 } else { 1677 pjsip_hdr *pos = NULL; 1677 1678 pjsip_contact_hdr *h_contact; 1678 1679 pjsip_uri *uri = NULL; 1679 1680 1680 /* Otherwise URI is Contact URI */ 1681 h_contact = (pjsip_contact_hdr*) 1682 pjsip_msg_find_hdr(rdata->msg_info.msg, PJSIP_H_CONTACT, 1683 NULL); 1684 if (h_contact) 1685 uri = (pjsip_uri*) pjsip_uri_get_uri(h_contact->uri); 1681 /* Otherwise URI is Contact URI. 1682 * Iterate the Contact URI until we find sip: or sips: scheme. 1683 */ 1684 do { 1685 h_contact = (pjsip_contact_hdr*) 1686 pjsip_msg_find_hdr(rdata->msg_info.msg, PJSIP_H_CONTACT, 1687 pos); 1688 if (h_contact) { 1689 uri = (pjsip_uri*) pjsip_uri_get_uri(h_contact->uri); 1690 if (!PJSIP_URI_SCHEME_IS_SIP(uri) && 1691 !PJSIP_URI_SCHEME_IS_SIPS(uri)) 1692 { 1693 pos = (pjsip_hdr*)h_contact->next; 1694 if (pos == &rdata->msg_info.msg->hdr) 1695 h_contact = NULL; 1696 } else { 1697 break; 1698 } 1699 } 1700 } while (h_contact); 1686 1701 1687 1702 -
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_pres.c
r2186 r2194 689 689 status); 690 690 PJSUA_UNLOCK(); 691 pjsip_endpt_respond_stateless(pjsua_var.endpt, rdata, 400, NULL, 692 NULL, NULL); 691 693 return PJ_TRUE; 692 694 } … … 701 703 status); 702 704 PJSUA_UNLOCK(); 705 pjsip_endpt_respond_stateless(pjsua_var.endpt, rdata, 400, NULL, 706 NULL, NULL); 703 707 return PJ_TRUE; 704 708 }
Note: See TracChangeset
for help on using the changeset viewer.