mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-24 14:56:58 +00:00
Make the ldap version setting work without having both version and protocol set.
(closes issue #12613) Reported by: suretec git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@116350 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1432,7 +1432,7 @@ int parse_config(void)
|
||||
} else
|
||||
ast_copy_string(basedn, s, sizeof(basedn));
|
||||
|
||||
if (!(s = ast_variable_retrieve(config, "_general", "version")) || !(s = ast_variable_retrieve(config, "_general", "protocol"))) {
|
||||
if (!(s = ast_variable_retrieve(config, "_general", "version")) && !(s = ast_variable_retrieve(config, "_general", "protocol"))) {
|
||||
ast_log(LOG_NOTICE, "No explicit LDAP version found, using 3 as default.\n");
|
||||
version = 3;
|
||||
} else if (sscanf(s, "%d", &version) != 1 || version < 1 || version > 6) {
|
||||
|
Reference in New Issue
Block a user