[asterisk-commits] russell: branch 1.6.0 r115524 - in /branches/1.6.0: ./ res/res_config_ldap.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed May 7 13:35:53 CDT 2008
Author: russell
Date: Wed May 7 13:35:52 2008
New Revision: 115524
URL: http://svn.digium.com/view/asterisk?view=rev&rev=115524
Log:
Merged revisions 115523 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r115523 | russell | 2008-05-07 13:33:50 -0500 (Wed, 07 May 2008) | 6 lines
Only save a password if a username exists.
(closes issue #12600)
Reported By: suretec
Patch by me
........
Modified:
branches/1.6.0/ (props changed)
branches/1.6.0/res/res_config_ldap.c
Propchange: branches/1.6.0/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.
Modified: branches/1.6.0/res/res_config_ldap.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.0/res/res_config_ldap.c?view=diff&rev=115524&r1=115523&r2=115524
==============================================================================
--- branches/1.6.0/res/res_config_ldap.c (original)
+++ branches/1.6.0/res/res_config_ldap.c Wed May 7 13:35:52 2008
@@ -1401,11 +1401,14 @@
} else
ast_copy_string(user, s, sizeof(user));
- if (!(s = ast_variable_retrieve(config, "_general", "pass"))) {
- ast_log(LOG_WARNING, "No directory password found, using 'asterisk' as default.\n");
- ast_copy_string(pass, "asterisk", sizeof(pass) - 1);
- } else
- ast_copy_string(pass, s, sizeof(pass));
+ if (!ast_strlen_zero(user)) {
+ if (!(s = ast_variable_retrieve(config, "_general", "pass"))) {
+ ast_log(LOG_WARNING, "No directory password found, using 'asterisk' as default.\n");
+ ast_copy_string(pass, "asterisk", sizeof(pass));
+ } else {
+ ast_copy_string(pass, s, sizeof(pass));
+ }
+ }
/* URL is preferred, use host and port if not found */
if ((s = ast_variable_retrieve(config, "_general", "url"))) {
More information about the asterisk-commits
mailing list