summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGunnar Wrobel <wrobel@pardus.de>2010-07-17 13:43:09 (GMT)
committerGunnar Wrobel <wrobel@pardus.de>2010-07-17 13:43:09 (GMT)
commitc013d9d6c09e7b3c6ac879958988c8c4689a6794 (patch)
tree4525e18d7501f1de09c9e2e89460df090781e5ed
parent65b98aa89c9c7b55d4178f07341be1f07b3d04f9 (diff)
downloadperl-Kolab-c013d9d6c09e7b3c6ac879958988c8c4689a6794.tar.gz
kolab/issue977 (Kolab suppresses ldap error messages)
kolab/issue978 (incorrect ->abandon; call)
-rw-r--r--ChangeLog7
-rw-r--r--lib/Kolab/LDAP.pm13
2 files changed, 17 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 720de48..bc8da55 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-07-17 Gunnar Wrobel <p@rdus.de>
+
+ * lib/Kolab/LDAP.pm:
+
+ kolab/issue977 (Kolab suppresses ldap error messages)
+ kolab/issue978 (incorrect $ldap->abandon; call)
+
2010-06-28 Gunnar Wrobel <p@rdus.de>
* lib/Kolab/LDAP.pm:
diff --git a/lib/Kolab/LDAP.pm b/lib/Kolab/LDAP.pm
index d3426d1..8756be0 100644
--- a/lib/Kolab/LDAP.pm
+++ b/lib/Kolab/LDAP.pm
@@ -321,7 +321,7 @@ sub create
timeout => 20,
async => $as,
verify => 'none',
- onerror => 'undef'
+ onerror => \&ldap_error
);
} else {
$ldap = Net::LDAP->new(
@@ -330,7 +330,7 @@ sub create
version => 3,
timeout => 20,
async => $as,
- onerror => 'undef'
+ onerror => \&ldap_error
);
}
if (!$ldap) {
@@ -356,7 +356,6 @@ sub destroy
my $ldap = shift;
if (defined($ldap) && ($ldap->isa('Net::LDAP') || $ldap->isa('Net::LDAPS'))) {
- $ldap->abandon;
$ldap->unbind;
$ldap->disconnect;
}
@@ -1009,6 +1008,14 @@ sub make_salt {
return join "", @tab[ map {rand 64} (1 .. $length) ];
}
+sub ldap_error {
+ my $mesg = shift;
+ my $errstr = $mesg->dn || '';
+ $errstr .= ": " if $errstr;
+ $errstr .= $mesg->error if $mesg->error;
+ Kolab::log('L', $errstr, KOLAB_ERROR);
+}
+
1;
__END__