Changeset 1518


Ignore:
Timestamp:
Oct 24, 2007 8:32:00 AM (16 years ago)
Author:
bennylp
Message:

Fixed ticket #401: Unable to register when account URI contains display name

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsip-ua/sip_reg.c

    r1472 r1518  
    714714                if (hdr->expires >= 0 && hdr->expires < expiration) { 
    715715                    pjsip_contact_hdr *our_contact; 
     716                    const pjsip_uri *uri1, *uri2; 
    716717 
    717718                    our_contact = (pjsip_contact_hdr*) 
     
    723724                     * that we register. 
    724725                     */ 
    725                     if (pjsip_uri_cmp(PJSIP_URI_IN_CONTACT_HDR,  
    726                                       hdr->uri,  
    727                                       our_contact->uri)==0)  
     726 
     727                    /* Exclude the display name when comparing the URI. 
     728                     * This is because a well known open source proxy server 
     729                     * doesn't return the display name in the Contact header 
     730                     * of the REGISTER response. 
     731                     */ 
     732                    uri1 = pjsip_uri_get_uri(hdr->uri); 
     733                    uri2 = pjsip_uri_get_uri(our_contact->uri); 
     734                    if (pjsip_uri_cmp(PJSIP_URI_IN_CONTACT_HDR, uri1, uri2)==0) 
    728735                    { 
    729736                        expiration = contact[i]->expires; 
Note: See TracChangeset for help on using the changeset viewer.