only require user and pass in gateway when register is true

This commit is contained in:
Anthony Minessale 2011-10-07 10:51:02 -05:00
parent 9e09483589
commit 9e4ca2c2a7
1 changed files with 9 additions and 7 deletions

View File

@ -2416,14 +2416,16 @@ static void parse_gateways(sofia_profile_t *profile, switch_xml_t gateways_tag)
}
}
if (zstr(username)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "ERROR: username param is REQUIRED!\n");
goto skip;
}
if (switch_true(register_str)) {
if (zstr(username)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "ERROR: username param is REQUIRED!\n");
goto skip;
}
if (zstr(password)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "ERROR: password param is REQUIRED!\n");
goto skip;
if (zstr(password)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "ERROR: password param is REQUIRED!\n");
goto skip;
}
}
if (zstr(from_user)) {