mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-22 12:52:33 +00:00
Merge "res_pjsip_config_wizard: Don't crash if misconfigured"
This commit is contained in:
@@ -911,7 +911,11 @@ static int handle_registrations(const struct ast_sorcery *sorcery, struct object
|
||||
}
|
||||
|
||||
if (is_variable_true(wizvars, "sends_auth")) {
|
||||
username = ast_variable_find_last_in_list(wizvars, "outbound_auth/username");
|
||||
if (!(username = ast_variable_find_last_in_list(wizvars, "outbound_auth/username"))) {
|
||||
ast_log(LOG_ERROR, "Wizard '%s' must have 'outbound_auth/username' if it sends"
|
||||
" authentication.\n", id);
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
username = id;
|
||||
}
|
||||
|
Reference in New Issue
Block a user