Changeset 3441 for pjproject/trunk/pjsip/src/pjsua-lib/pjsua_acc.c
- Timestamp:
- Mar 15, 2011 3:20:37 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_acc.c
r3377 r3441 100 100 101 101 dst->reg_timeout = src->reg_timeout; 102 dst->reg_delay_before_refresh = src->reg_delay_before_refresh; 102 103 dst->cred_count = src->cred_count; 103 104 … … 393 394 pjsua_acc_config_dup(acc->pool, &pjsua_var.acc[id].cfg, cfg); 394 395 395 /* Normalize registration timeout */ 396 if (pjsua_var.acc[id].cfg.reg_uri.slen && 397 pjsua_var.acc[id].cfg.reg_timeout == 0) 398 { 399 pjsua_var.acc[id].cfg.reg_timeout = PJSUA_REG_INTERVAL; 396 /* Normalize registration timeout and refresh delay */ 397 if (pjsua_var.acc[id].cfg.reg_uri.slen) { 398 if (pjsua_var.acc[id].cfg.reg_timeout == 0) { 399 pjsua_var.acc[id].cfg.reg_timeout = PJSUA_REG_INTERVAL; 400 } 401 if (pjsua_var.acc[id].cfg.reg_delay_before_refresh == 0) { 402 pjsua_var.acc[id].cfg.reg_delay_before_refresh = 403 PJSIP_REGISTER_CLIENT_DELAY_BEFORE_REFRESH; 404 } 400 405 } 401 406 … … 941 946 /* Registration */ 942 947 acc->cfg.reg_timeout = cfg->reg_timeout; 948 acc->cfg.reg_delay_before_refresh = cfg->reg_delay_before_refresh; 943 949 acc->cfg.unreg_timeout = cfg->unreg_timeout; 944 950 acc->cfg.allow_contact_rewrite = cfg->allow_contact_rewrite; … … 946 952 acc->cfg.drop_calls_on_reg_fail = cfg->drop_calls_on_reg_fail; 947 953 948 /* Normalize registration timeout */ 949 if (acc->cfg.reg_uri.slen && acc->cfg.reg_timeout == 0) 950 acc->cfg.reg_timeout = PJSUA_REG_INTERVAL; 954 /* Normalize registration timeout and refresh delay */ 955 if (acc->cfg.reg_uri.slen ) { 956 if (acc->cfg.reg_timeout == 0) { 957 acc->cfg.reg_timeout = PJSUA_REG_INTERVAL; 958 } 959 if (acc->cfg.reg_delay_before_refresh == 0) { 960 acc->cfg.reg_delay_before_refresh = 961 PJSIP_REGISTER_CLIENT_DELAY_BEFORE_REFRESH; 962 } 963 } 951 964 952 965 /* Registrar URI */ … … 1816 1829 pjsip_regc_set_credentials( acc->regc, acc->cred_cnt, acc->cred); 1817 1830 } 1831 1832 /* Set delay before registration refresh */ 1833 pjsip_regc_set_delay_before_refresh(acc->regc, 1834 acc->cfg.reg_delay_before_refresh); 1818 1835 1819 1836 /* Set authentication preference */
Note: See TracChangeset
for help on using the changeset viewer.