Changeset 4718


Ignore:
Timestamp:
Jan 29, 2014 6:58:21 AM (10 years ago)
Author:
nanang
Message:

Fix #1727:

  • Start timer TIMER_TYPE_UAS_TIMEOUT when incoming subscription request is accepted (via pjsip_evsub_accept()).
  • Kill any timer when subscription state is shifting into TERMINATED.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsip-simple/evsub.c

    r4572 r4718  
    594594        prev_state != PJSIP_EVSUB_STATE_TERMINATED)  
    595595    { 
     596        /* Kill any timer. */ 
     597        set_timer(sub, TIMER_TYPE_NONE, 0); 
     598 
    596599        if (sub->pending_tsx == 0) { 
    597600            evsub_destroy(sub); 
     
    11481151        goto on_return; 
    11491152 
     1153    /* Set UAS timeout timer, when status code is 2xx and state is not 
     1154     * terminated. 
     1155     */ 
     1156    if (st_code/100 == 2 && sub->state != PJSIP_EVSUB_STATE_TERMINATED) { 
     1157        PJ_LOG(5,(sub->obj_name, "UAS timeout in %d seconds", 
     1158                  sub->expires->ivalue)); 
     1159        set_timer(sub, TIMER_TYPE_UAS_TIMEOUT, sub->expires->ivalue); 
     1160    } 
    11501161 
    11511162on_return: 
     
    18031814            } 
    18041815 
    1805             /* Kill any timer. */ 
    1806             set_timer(sub, TIMER_TYPE_NONE, 0); 
    1807  
    18081816            /* Set state to TERMINATED */ 
    18091817            set_state(sub, PJSIP_EVSUB_STATE_TERMINATED,  
Note: See TracChangeset for help on using the changeset viewer.