Changeset 3586 for pjproject


Ignore:
Timestamp:
Jun 16, 2011 1:15:04 PM (13 years ago)
Author:
nanang
Message:

Re #1306:

  • Moved PJSIP_TSX_1XX_RETRANS_DELAY definition to sip_config.h.
  • Updated retransmission mechanism to skip retransmission rescheduling when the interval is zero.
Location:
pjproject/branches/1.x/pjsip
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/1.x/pjsip/include/pjsip/sip_config.h

    r3553 r3586  
    669669#endif 
    670670 
     671/** 
     672 * Delay for non-100 1xx retransmission, in seconds. 
     673 * Set to 0 to disable this feature. 
     674 * 
     675 * Default: 60 seconds 
     676 */ 
     677#ifndef PJSIP_TSX_1XX_RETRANS_DELAY 
     678#   define PJSIP_TSX_1XX_RETRANS_DELAY  60 
     679#endif 
     680 
    671681#define PJSIP_MAX_TSX_KEY_LEN           (PJSIP_MAX_URL_SIZE*2) 
    672682 
  • pjproject/branches/1.x/pjsip/src/pjsip/sip_transaction.c

    r3553 r3586  
    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 
     
    20962089static void tsx_resched_retransmission( pjsip_transaction *tsx ) 
    20972090{ 
    2098     pj_time_val timeout; 
    20992091    pj_uint32_t msec_time; 
    21002092 
     
    21292121    } 
    21302122 
    2131     timeout.sec = msec_time / 1000; 
    2132     timeout.msec = msec_time % 1000; 
    2133     tsx->retransmit_timer.id = TIMER_ACTIVE; 
    2134     pjsip_endpt_schedule_timer( tsx->endpt, &tsx->retransmit_timer,  
    2135                                 &timeout); 
     2123    if (msec_time != 0) { 
     2124        pj_time_val timeout; 
     2125 
     2126        timeout.sec = msec_time / 1000; 
     2127        timeout.msec = msec_time % 1000; 
     2128        tsx->retransmit_timer.id = TIMER_ACTIVE; 
     2129        pjsip_endpt_schedule_timer( tsx->endpt, &tsx->retransmit_timer,  
     2130                                    &timeout); 
     2131    } 
    21362132} 
    21372133 
Note: See TracChangeset for help on using the changeset viewer.