Skip to content
Browse files

Fix error checking on client_step to check for an empty list, not undef

  • Loading branch information...
1 parent a4b1d96 commit 81e8322272b953e9cb4c36005546a7a214f150d8 @gbarr gbarr committed Oct 17, 2003
Showing with 3 additions and 5 deletions.
  1. +3 −5 lib/Net/LDAP/Bind.pm
View
8 lib/Net/LDAP/Bind.pm
@@ -1,4 +1,4 @@
-# Copyright (c) 1998-2000 Graham Barr <gbarr@pobox.com>. All rights reserved.
+# Copyright (c) 1998-2003 Graham Barr <gbarr@pobox.com>. All rights reserved.
# This program is free software; you can redistribute it and/or
# modify it under the same terms as Perl itself.
@@ -38,10 +38,8 @@ sub decode {
$self->{mesgid} = Net::LDAP::Message->NewMesgID(); # Get a new message ID
- my $resp = $sasl->client_step($bind->{serverSaslCreds});
-
- $self->set_error(LDAP_DECODING_ERROR,"LDAP decode error"), return
- unless defined $resp;
+ my ($resp) = $sasl->client_step($bind->{serverSaslCreds})
+ or $self->set_error(LDAP_DECODING_ERROR,"LDAP decode error"), return;
$self->encode(
bindRequest => {

0 comments on commit 81e8322

Please sign in to comment.
Something went wrong with that request. Please try again.