Changeset 3139 for pjproject/trunk


Ignore:
Timestamp:
Apr 14, 2010 8:12:08 AM (15 years ago)
Author:
nanang
Message:

Minor fix #1044:

  • Moved the code of disconnecting calls (after first re-reg attempt failure) to schedule_reregistration(), so it will be executed earlier (right after the failure of re-reg attempt).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_acc.c

    r3128 r3139  
    19861986        schedule_reregistration(acc); 
    19871987 
     1988on_return: 
     1989    PJSUA_UNLOCK(); 
     1990} 
     1991 
     1992 
     1993/* Schedule reregistration for specified account. Note that the first  
     1994 * re-registration after a registration failure will be done immediately. 
     1995 * Also note that this function should be called within PJSUA mutex. 
     1996 */ 
     1997static void schedule_reregistration(pjsua_acc *acc) 
     1998{ 
     1999    pj_time_val delay; 
     2000 
     2001    pj_assert(acc && acc->valid && acc->cfg.reg_retry_interval); 
     2002 
    19882003    /* If configured, disconnect calls of this account after the first 
    19892004     * reregistration attempt failed. 
    19902005     */ 
    1991     if (acc->cfg.drop_calls_on_reg_fail && acc->auto_rereg.attempt_cnt > 1) 
     2006    if (acc->cfg.drop_calls_on_reg_fail && acc->auto_rereg.attempt_cnt >= 1) 
    19922007    { 
    19932008        unsigned i, cnt; 
     
    20062021        } 
    20072022    } 
    2008  
    2009 on_return: 
    2010  
    2011     PJSUA_UNLOCK(); 
    2012 } 
    2013  
    2014  
    2015 /* Schedule reregistration for specified account. Note that the first  
    2016  * re-registration after a registration failure will be done immediately. 
    2017  * Also note that this function should be called within PJSUA mutex. 
    2018  */ 
    2019 static void schedule_reregistration(pjsua_acc *acc) 
    2020 { 
    2021     pj_time_val delay; 
    2022  
    2023     pj_assert(acc && acc->valid && acc->cfg.reg_retry_interval); 
    20242023 
    20252024    /* Cancel any re-registration timer */ 
Note: See TracChangeset for help on using the changeset viewer.