From 446b8856cd871ce456b737b7cc7b32407125d97d Mon Sep 17 00:00:00 2001 From: rettenbe Date: Tue, 23 Sep 2008 08:43:25 +0000 Subject: [PATCH] update: add debug line in func get_ldap_handle() if connection to ldap is not possible git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12536 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-si/gosa-si-server | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gosa-si/gosa-si-server b/gosa-si/gosa-si-server index 7d91b4dc4..e8abf6992 100755 --- a/gosa-si/gosa-si-server +++ b/gosa-si/gosa-si-server @@ -455,7 +455,7 @@ sub import_modules { eval { require $file; }; if ($@) { daemon_log("0 ERROR: gosa-si-server could not load module $file", 1); - daemon_log("$@", 5); + daemon_log("$@", 1); } else { my $info = eval($mod_name.'::get_module_info()'); # Only load module if get_module_info() returns a non-null object @@ -2072,7 +2072,11 @@ sub get_ldap_handle { if ($session_id == 0) { daemon_log("$session_id DEBUG: get_ldap_handle invoked without a session_id, create a new ldap_handle", 7); $ldap_handle = Net::LDAP->new( $ldap_uri ); - $ldap_handle->bind($ldap_admin_dn, password => $ldap_admin_password) or daemon_log("$session_id ERROR: Bind to LDAP $ldap_uri as $ldap_admin_dn failed!"); + if (defined $ldap_handle) { + $ldap_handle->bind($ldap_admin_dn, password => $ldap_admin_password) or daemon_log("$session_id ERROR: Bind to LDAP $ldap_uri as $ldap_admin_dn failed!"); + } else { + daemon_log("$session_id ERROR: creation of a new LDAP handle failed (ldap_uri '$ldap_uri')"); + } } else { my $session_reference = $global_kernel->ID_id_to_session($session_id); -- 2.30.2