From f674299b721d26ea97fc36e7e6818a84f3d311d3 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Tue, 22 Jan 2013 02:58:23 +0100 Subject: Better check for domain existence. --- misc/deleteExpiredEntries.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'misc') diff --git a/misc/deleteExpiredEntries.pl b/misc/deleteExpiredEntries.pl index d4de6b6..3cbf570 100755 --- a/misc/deleteExpiredEntries.pl +++ b/misc/deleteExpiredEntries.pl @@ -53,14 +53,14 @@ die $entries->error."\n" if $entries->code; $fp->done; sub delete_entry { - shift; - my $obj = shift; + my ($mesg, $obj) = @_; if (defined $obj and $obj->isa('Net::LDAP::Entry')) { # print STDERR "Deleting DN ".$obj->dn."\n"; $obj->delete; my $mesg = $obj->update($fp->ldap); die $mesg->error."\n" if $mesg->code; } + $mesg->pop_entry; } -- cgit v1.2.3