Ignore:
Timestamp:
Oct 24, 2011 9:28:13 AM (13 years ago)
Author:
ming
Message:

Re #1395: Backport of PJSIP 1.x branch into PJSIP 2.0 trunk

TODO: ticket #1268 (Option for automatic/manual sending of RTCP SDES/BYE for the stream) for video stream.

Location:
pjproject/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk

  • pjproject/trunk/pjsip/src/pjsip/sip_transaction.c

    r3753 r3841  
    146146#define TIMER_INACTIVE  0 
    147147#define TIMER_ACTIVE    1 
    148  
    149 /* Delay for 1xx retransmission (should be 60 seconds). 
    150  * Specify 0 to disable this feature 
    151  */ 
    152 #ifndef PJSIP_TSX_1XX_RETRANS_DELAY 
    153 #   define PJSIP_TSX_1XX_RETRANS_DELAY    60 
    154 #endif 
    155148 
    156149 
     
    21192112static void tsx_resched_retransmission( pjsip_transaction *tsx ) 
    21202113{ 
    2121     pj_time_val timeout; 
    21222114    pj_uint32_t msec_time; 
    21232115 
     
    21522144    } 
    21532145 
    2154     timeout.sec = msec_time / 1000; 
    2155     timeout.msec = msec_time % 1000; 
    2156     tsx->retransmit_timer.id = TIMER_ACTIVE; 
    2157     pjsip_endpt_schedule_timer( tsx->endpt, &tsx->retransmit_timer,  
    2158                                 &timeout); 
     2146    if (msec_time != 0) { 
     2147        pj_time_val timeout; 
     2148 
     2149        timeout.sec = msec_time / 1000; 
     2150        timeout.msec = msec_time % 1000; 
     2151        tsx->retransmit_timer.id = TIMER_ACTIVE; 
     2152        pjsip_endpt_schedule_timer( tsx->endpt, &tsx->retransmit_timer,  
     2153                                    &timeout); 
     2154    } 
    21592155} 
    21602156 
     
    29882984        } 
    29892985        lock_timer(tsx); 
     2986        /* In the short period above timer may have been inserted 
     2987         * by set_timeout() (by CANCEL). Cancel it if necessary. See: 
     2988         *  https://trac.pjsip.org/repos/ticket/1374 
     2989         */ 
     2990        if (tsx->timeout_timer.id) 
     2991            pjsip_endpt_cancel_timer( tsx->endpt, &tsx->timeout_timer ); 
    29902992        tsx->timeout_timer.id = TIMER_ACTIVE; 
    29912993        pjsip_endpt_schedule_timer( tsx->endpt, &tsx->timeout_timer, &timeout); 
Note: See TracChangeset for help on using the changeset viewer.