Changeset 3762
- Timestamp:
- Sep 21, 2011 7:38:22 AM (13 years ago)
- Location:
- pjproject/branches/1.x/pjsip
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/1.x/pjsip/include/pjsua-lib/pjsua.h
r3594 r3762 2520 2520 * Specify interval of auto registration retry upon registration failure 2521 2521 * (including caused by transport problem), in second. Set to 0 to 2522 * disable auto re-registration. 2522 * disable auto re-registration. Note that if the registration retry 2523 * occurs because of transport failure, the first retry will be done 2524 * after \a reg_first_retry_interval seconds instead. Also note that 2525 * the interval will be randomized slightly by approximately +/- ten 2526 * seconds to avoid all clients re-registering at the same time. 2527 * 2528 * See also \a reg_first_retry_interval setting. 2523 2529 * 2524 2530 * Default: #PJSUA_REG_RETRY_INTERVAL 2525 2531 */ 2526 2532 unsigned reg_retry_interval; 2533 2534 /** 2535 * This specifies the interval for the first registration retry. The 2536 * registration retry is explained in \a reg_retry_interval. Note that 2537 * the value here will also be randomized by +/- ten seconds. 2538 * 2539 * Default: 0 2540 */ 2541 unsigned reg_first_retry_interval; 2527 2542 2528 2543 /** -
pjproject/branches/1.x/pjsip/src/pjsua-lib/pjsua_acc.c
r3742 r3762 2753 2753 2754 2754 /* Reregistration attempt. The first attempt will be done immediately. */ 2755 delay.sec = acc->auto_rereg.attempt_cnt? acc->cfg.reg_retry_interval : 0; 2755 delay.sec = acc->auto_rereg.attempt_cnt? acc->cfg.reg_retry_interval : 2756 acc->cfg.reg_first_retry_interval; 2756 2757 delay.msec = 0; 2758 2759 /* Randomize interval by +/- 10 secs */ 2760 if (delay.sec >= 10) { 2761 delay.msec = -10000 + (pj_rand() % 20000); 2762 } else { 2763 delay.sec = 0; 2764 delay.msec = (pj_rand() % 10000); 2765 } 2766 pj_time_val_normalize(&delay); 2767 2757 2768 pjsua_schedule_timer(&acc->auto_rereg.timer, &delay); 2758 2769 }
Note: See TracChangeset
for help on using the changeset viewer.