Changeset 1946


Ignore:
Timestamp:
May 4, 2008 10:49:40 AM (11 years ago)
Author:
bennylp
Message:

If regc.check_contact is disabled, and no Expires header has been found, but the server does return one single Contact header, assumes that the server is broken/unable to return the correct Contact. In this case, get the expiration from the single Contact header in the response (thanks Alan Bond)

File:
1 edited

Legend:

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

    r1837 r1946  
    770770            } 
    771771 
     772            /* If regc.check_contact is disabled, and no Expires header  
     773             * has been found, but the server does return one single 
     774             * Contact header, assumes that the server is broken/unable to 
     775             * return the correct Contact. In this case, get the expiration 
     776             * from the single Contact header in the response. 
     777             */ 
     778            if (expiration==NOEXP && !pjsip_cfg()->regc.check_contact &&  
     779                contact_cnt==1)  
     780            { 
     781                if (contact[0]->expires >= 0) 
     782                    expiration = contact[0]->expires; 
     783            } 
     784 
    772785            /* When the response doesn't contain our Contact header, that 
    773786             * means we have been unregistered. 
Note: See TracChangeset for help on using the changeset viewer.