Index: res/res_config_ldap.c =================================================================== --- res/res_config_ldap.c (revision 115512) +++ res/res_config_ldap.c (working copy) @@ -58,6 +58,7 @@ #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 @@ } 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));