From 3bf7d3eaffb458f837f73e89254337f7e2dbf370 Mon Sep 17 00:00:00 2001 From: rettenbe Date: Tue, 23 Sep 2008 08:42:51 +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/branches/2.6-lhm@12535 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-si/gosa-si-server | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gosa-si/gosa-si-server b/gosa-si/gosa-si-server index 0ed129cb4..7e9e0a9ee 100755 --- a/gosa-si/gosa-si-server +++ b/gosa-si/gosa-si-server @@ -2062,7 +2062,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