Skip to content

Commit

Permalink
Don't accumulate intermediate messages passed to a callback.
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Mikkelson authored and marschap committed Sep 4, 2012
1 parent a1155cd commit 6144910
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/Net/LDAP/Message.pm
Expand Up @@ -148,10 +148,11 @@ sub decode { # $self, $pdu, $control


my $intermediate = Net::LDAP::Intermediate->from_asn($data); my $intermediate = Net::LDAP::Intermediate->from_asn($data);


push(@{$self->{'intermediate'} ||= []}, $intermediate); if (defined $self->{callback}) {

$self->{callback}->($self, $intermediate)
$self->{callback}->($self, $intermediate) } else {
if (defined $self->{callback}); push(@{$self->{'intermediate'} ||= []}, $intermediate);
}


return $self; return $self;
} else { } else {
Expand Down

0 comments on commit 6144910

Please sign in to comment.