aboutsummaryrefslogtreecommitdiffstats
path: root/res/res_config_ldap.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-05-07 18:30:29 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-05-07 18:30:29 +0000
commita11b2db3a8af83124f1f3b714009e8536a437246 (patch)
treebb308d1f521c35c5a6af010ddc6c92a17c5d6573 /res/res_config_ldap.c
parent9fa4b5e6a4b501f84dbd0c8b755a65ff5a759036 (diff)
Merged revisions 115521 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r115521 | russell | 2008-05-07 13:30:12 -0500 (Wed, 07 May 2008) | 7 lines Use the default that the log output claims will be used for the basedn (closes issue #12599) Reported by: suretec Patches: 12599.patch uploaded by juggie (license 24) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@115522 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_config_ldap.c')
-rw-r--r--res/res_config_ldap.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/res/res_config_ldap.c b/res/res_config_ldap.c
index cb1bd78cb..52855fdec 100644
--- a/res/res_config_ldap.c
+++ b/res/res_config_ldap.c
@@ -58,6 +58,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/linkedlists.h"
#define RES_CONFIG_LDAP_CONF "res_ldap.conf"
+#define RES_CONFIG_LDAP_DEFAULT_BASEDN "asterisk"
AST_MUTEX_DEFINE_STATIC(ldap_lock);
@@ -1423,8 +1424,8 @@ int parse_config(void)
}
if (!(s = ast_variable_retrieve(config, "_general", "basedn"))) {
- ast_log(LOG_ERROR, "No LDAP base dn found, using 'asterisk' as default.\n");
- basedn[0] = '\0';
+ ast_log(LOG_ERROR, "No LDAP base dn found, using '%s' as default.\n", RES_CONFIG_LDAP_DEFAULT_BASEDN);
+ ast_copy_string(basedn, RES_CONFIG_LDAP_DEFAULT_BASEDN, sizeof(basedn));
} else
ast_copy_string(basedn, s, sizeof(basedn));