summaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2008-05-14 18:25:54 +0000
committerJoshua Colp <jcolp@digium.com>2008-05-14 18:25:54 +0000
commitac876a8e4ed9fecca065045459a5efe50b64f71b (patch)
tree7e77f14d91bea2a276dc5572410ef6698a27d740 /res
parentc15ed0f3f631ea375189ea7a45d7473dcfb214bf (diff)
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
Diffstat (limited to 'res')
-rw-r--r--res/res_config_ldap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/res/res_config_ldap.c b/res/res_config_ldap.c
index 33ed247b7..b8816b920 100644
--- a/res/res_config_ldap.c
+++ b/res/res_config_ldap.c
@@ -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) {