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
1.6.1
Joshua Colp 17 years ago
parent c15ed0f3f6
commit ac876a8e4e

@ -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) {

Loading…
Cancel
Save