FS-7228 - Max Register Refresh before the Register is challenged for credentials

This commit is contained in:
Rajesh Panicker
2015-02-05 23:23:41 -08:00
parent 9e15c4e5b5
commit 5db8a0c16b
3 changed files with 9 additions and 1 deletions
+7
View File
@@ -4971,6 +4971,8 @@ switch_status_t config_sofia(sofia_config_t reload, char *profile_name)
}
} else if (!strcasecmp(var, "nonce-ttl")) {
profile->nonce_ttl = atoi(val);
} else if (!strcasecmp(var, "max-auth-validity")) {
profile->max_auth_validity = atoi(val);
} else if (!strcasecmp(var, "accept-blind-reg")) {
if (switch_true(val)) {
sofia_set_pflag(profile, PFLAG_BLIND_REG);
@@ -5390,6 +5392,11 @@ switch_status_t config_sofia(sofia_config_t reload, char *profile_name)
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Setting nonce TTL to 60 seconds\n");
profile->nonce_ttl = 60;
}
if (!profile->max_auth_validity) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Setting MAX Auth Validity to 0 Attempts\n");
profile->max_auth_validity = 0;
}
if (!profile->sdp_username) {
profile->sdp_username = switch_core_strdup(profile->pool, "FreeSWITCH");