Changeset 3190 for pjproject/trunk/pjsip/src/pjsip/sip_dialog.c
- Timestamp:
- Jun 2, 2010 3:03:43 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsip/sip_dialog.c
r3068 r3190 433 433 pos); 434 434 if (contact_hdr) { 435 if (!PJSIP_URI_SCHEME_IS_SIP(contact_hdr->uri) && 436 !PJSIP_URI_SCHEME_IS_SIPS(contact_hdr->uri)) 435 if (!contact_hdr->uri || 436 (!PJSIP_URI_SCHEME_IS_SIP(contact_hdr->uri) && 437 !PJSIP_URI_SCHEME_IS_SIPS(contact_hdr->uri))) 437 438 { 438 439 pos = (pjsip_hdr*)contact_hdr->next; … … 612 613 contact = (const pjsip_contact_hdr*) 613 614 pjsip_msg_find_hdr(msg, PJSIP_H_CONTACT, NULL); 614 if (contact == NULL )615 if (contact == NULL || contact->uri == NULL) 615 616 return PJSIP_EMISSINGHDR; 616 617 … … 1502 1503 1503 1504 1504 /* This function is called by user agent upon receiving incoming re sponse1505 /* This function is called by user agent upon receiving incoming request 1505 1506 * message. 1506 1507 */ … … 1589 1590 pjsip_msg_find_hdr(rdata->msg_info.msg, PJSIP_H_CONTACT, 1590 1591 NULL); 1591 if (contact && (dlg->remote.contact==NULL || 1592 pjsip_uri_cmp(PJSIP_URI_IN_REQ_URI, 1593 dlg->remote.contact->uri, 1594 contact->uri))) 1592 if (contact && contact->uri && 1593 (dlg->remote.contact==NULL || 1594 pjsip_uri_cmp(PJSIP_URI_IN_REQ_URI, 1595 dlg->remote.contact->uri, 1596 contact->uri))) 1595 1597 { 1596 1598 dlg->remote.contact = (pjsip_contact_hdr*) … … 1794 1796 pjsip_msg_find_hdr(rdata->msg_info.msg, PJSIP_H_CONTACT, 1795 1797 NULL); 1796 if (contact && (dlg->remote.contact==NULL || 1797 pjsip_uri_cmp(PJSIP_URI_IN_REQ_URI, 1798 dlg->remote.contact->uri, 1799 contact->uri))) 1798 if (contact && contact->uri && 1799 (dlg->remote.contact==NULL || 1800 pjsip_uri_cmp(PJSIP_URI_IN_REQ_URI, 1801 dlg->remote.contact->uri, 1802 contact->uri))) 1800 1803 { 1801 1804 dlg->remote.contact = (pjsip_contact_hdr*) … … 1844 1847 PJSIP_H_CONTACT, 1845 1848 NULL); 1846 if (contact && (dlg->remote.contact==NULL || 1847 pjsip_uri_cmp(PJSIP_URI_IN_REQ_URI, 1848 dlg->remote.contact->uri, 1849 contact->uri))) 1849 if (contact && contact->uri && 1850 (dlg->remote.contact==NULL || 1851 pjsip_uri_cmp(PJSIP_URI_IN_REQ_URI, 1852 dlg->remote.contact->uri, 1853 contact->uri))) 1850 1854 { 1851 1855 dlg->remote.contact = (pjsip_contact_hdr*)
Note: See TracChangeset
for help on using the changeset viewer.