Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Don't accumulate intermediate messages passed to a callback.

  • Loading branch information...
commit 6144910f4f8b91df03a37bd4ee6ed65e9f1d82eb 1 parent a1155cd
Chris Mikkelson authored marschap committed
Showing with 5 additions and 4 deletions.
  1. +5 −4 lib/Net/LDAP/Message.pm
View
9 lib/Net/LDAP/Message.pm
@@ -148,10 +148,11 @@ sub decode { # $self, $pdu, $control
my $intermediate = Net::LDAP::Intermediate->from_asn($data);
- push(@{$self->{'intermediate'} ||= []}, $intermediate);
-
- $self->{callback}->($self, $intermediate)
- if (defined $self->{callback});
+ if (defined $self->{callback}) {
+ $self->{callback}->($self, $intermediate)
+ } else {
+ push(@{$self->{'intermediate'} ||= []}, $intermediate);
+ }
return $self;
} else {
Please sign in to comment.
Something went wrong with that request. Please try again.