aboutsummaryrefslogtreecommitdiffstats
path: root/res/res_config_ldap.c
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2008-05-14 18:25:54 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2008-05-14 18:25:54 +0000
commitc8b5ae3381b37695b7f09376559b83f7fedeac56 (patch)
tree7e77f14d91bea2a276dc5572410ef6698a27d740 /res/res_config_ldap.c
parente518ad7f98e1a96d84ce8f84abc9a498a3a5d435 (diff)
Make the ldap version setting work without having both version and protocol set.
(closes issue #12613) Reported by: suretec git-svn-id: http://svn.digium.com/svn/asterisk/trunk@116350 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_config_ldap.c')
-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) {