Ignore:
Timestamp:
Apr 20, 2012 9:59:51 AM (7 years ago)
Author:
bennylp
Message:

Fixed #1491: Failed to refresh (presence) subscription if Subscription-State header contains no "expires" parameter

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/1.x/pjsip/src/pjsip-simple/evsub.c

    r3553 r4064  
    18051805        pjsip_tx_data *tdata; 
    18061806        pj_status_t status; 
    1807         int next_refresh; 
    18081807 
    18091808        /* Only want to handle initial NOTIFY receive event. */ 
     
    18851884             pj_stricmp(&sub_state->sub_state, &STR_PENDING)==0)) 
    18861885        { 
    1887             next_refresh = sub_state->expires_param; 
    1888  
    1889         } else { 
    1890             next_refresh = sub->expires->ivalue; 
    1891         } 
    1892  
    1893         /* Update time */ 
    1894         update_expires(sub, next_refresh); 
    1895  
    1896         /* Start UAC refresh timer, only when we're not unsubscribing */ 
    1897         if (sub->expires->ivalue != 0) { 
    1898             unsigned timeout = (next_refresh > TIME_UAC_REFRESH) ? 
    1899                 next_refresh - TIME_UAC_REFRESH : next_refresh; 
     1886            int next_refresh = sub_state->expires_param; 
     1887            unsigned timeout; 
     1888 
     1889            update_expires(sub, next_refresh); 
     1890 
     1891            /* Start UAC refresh timer, only when we're not unsubscribing */ 
     1892            timeout = (next_refresh > TIME_UAC_REFRESH) ? 
     1893                        next_refresh - TIME_UAC_REFRESH : next_refresh; 
    19001894 
    19011895            PJ_LOG(5,(sub->obj_name, "Will refresh in %d seconds", timeout)); 
Note: See TracChangeset for help on using the changeset viewer.