- Timestamp:
- Jun 4, 2009 3:51:39 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_acc.c
r2737 r2745 569 569 pjsip_sip_uri *uri; 570 570 pjsip_via_hdr *via; 571 pj_sockaddr contact_addr; 572 pj_sockaddr recv_addr; 573 pj_status_t status; 574 pj_bool_t matched; 571 575 pj_str_t srv_ip; 572 576 … … 627 631 } 628 632 629 if (uri->port == rport && 630 pj_stricmp(&uri->host, via_addr)==0) 631 { 633 /* Convert IP address strings into sockaddr for comparison. 634 * (http://trac.pjsip.org/repos/ticket/863) 635 */ 636 status = pj_sockaddr_parse(pj_AF_UNSPEC(), 0, &uri->host, 637 &contact_addr); 638 if (status == PJ_SUCCESS) 639 status = pj_sockaddr_parse(pj_AF_UNSPEC(), 0, via_addr, 640 &recv_addr); 641 if (status == PJ_SUCCESS) { 642 /* Compare the addresses as sockaddr according to the ticket above */ 643 matched = (uri->port == rport && 644 pj_sockaddr_cmp(&contact_addr, &recv_addr)==0); 645 } else { 646 /* Compare the addresses as string, as before */ 647 matched = (uri->port == rport && 648 pj_stricmp(&uri->host, via_addr)==0); 649 } 650 651 if (matched) { 632 652 /* Address doesn't change */ 633 653 pj_pool_release(pool);
Note: See TracChangeset
for help on using the changeset viewer.