steffen: server/perl-kolab/Kolab-LDAP LDAP.pm,1.21,1.22
cvs at intevation.de
cvs at intevation.de
Mon Oct 11 16:49:23 CEST 2004
Author: steffen
Update of /kolabrepository/server/perl-kolab/Kolab-LDAP
In directory doto:/tmp/cvs-serv6696/Kolab-LDAP
Modified Files:
LDAP.pm
Log Message:
robuster when deleting
Index: LDAP.pm
===================================================================
RCS file: /kolabrepository/server/perl-kolab/Kolab-LDAP/LDAP.pm,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- LDAP.pm 5 Sep 2004 22:11:06 -0000 1.21
+++ LDAP.pm 11 Oct 2004 14:49:21 -0000 1.22
@@ -22,6 +22,7 @@
use 5.008;
use strict;
use warnings;
+use UNIVERSAL;
use Net::LDAP qw( LDAP_SUCCESS LDAP_PROTOCOL_ERROR LDAP_REFERRAL );
use Net::LDAPS;
use DB_File;
@@ -371,7 +372,7 @@
# Ok we are the last one...
Kolab::log('L', "Removing DN `$dn'");
my $mesg = $masterldap->delete($dn);
- if ($mesg->code ) {
+ if ($mesg && $mesg->code ) {
Kolab::log('L', "Unable to remove DN `$dn': ".$mesg->error, KOLAB_WARN);
}
} else {
@@ -380,7 +381,7 @@
my $mesg = $masterldap->modify( $dn, delete =>
{ $Kolab::config{$p . '_field_deleted'} =>
$Kolab::config{'fqdnhostname'} } );
- if ($mesg->code) {
+ if ($mesg && $mesg->code) {
Kolab::log('L', "Unable to remove ".$Kolab::config{'fqdnhostname'}
." from kolabdeleteflag in `$dn': ".$mesg->error, KOLAB_WARN);
}
@@ -508,7 +509,7 @@
],
);
- if ($ldapmesg->code <= 0) {
+ if ( UNIVERSAL::isa( $ldapmesg, 'Net::LDAP::Search') && $ldapmesg->code() <= 0) {
foreach $ldapobject ($ldapmesg->entries) {
deleteObject($ldap, $cyrus, $ldapobject, 1, $p);
}
@@ -531,7 +532,7 @@
],
);
- if ($ldapmesg->code <= 0) {
+ if ( UNIVERSAL::isa( $ldapmesg, 'Net::LDAP::Search') && $ldapmesg->code() <= 0) {
foreach $ldapobject ($ldapmesg->entries) {
createObject($ldap, $cyrus, $ldapobject, 1, $p, $doacls);
}
More information about the commits
mailing list