mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-13 00:04:53 +00:00
Merge "res_pjsip_config_wizard: Don't crash if misconfigured" into 16
This commit is contained in:
@@ -910,8 +910,12 @@ static int handle_registrations(const struct ast_sorcery *sorcery, struct object
|
|||||||
client_uri_pattern = "sip:${USERNAME}@${REMOTE_HOST}";
|
client_uri_pattern = "sip:${USERNAME}@${REMOTE_HOST}";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(is_variable_true(wizvars, "sends_auth")) {
|
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 {
|
} else {
|
||||||
username = id;
|
username = id;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user