ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent/lib/AnyEvent/Handle.pm
(Generate patch)

Comparing AnyEvent/lib/AnyEvent/Handle.pm (file contents):
Revision 1.22 by root, Sat May 24 15:10:48 2008 UTC vs.
Revision 1.23 by root, Sat May 24 15:11:22 2008 UTC

654 if (defined (my $buf = Net::SSLeay::BIO_read ($self->{tls_wbio}))) { 654 if (defined (my $buf = Net::SSLeay::BIO_read ($self->{tls_wbio}))) {
655 $self->{wbuf} .= $buf; 655 $self->{wbuf} .= $buf;
656 $self->_drain_wbuf; 656 $self->_drain_wbuf;
657 } 657 }
658 658
659 while () {
660 if (defined (my $buf = Net::SSLeay::read ($self->{tls}))) { 659 while (defined (my $buf = Net::SSLeay::read ($self->{tls}))) {
661 $self->{rbuf} .= $buf; 660 $self->{rbuf} .= $buf;
662 $self->_drain_rbuf; 661 $self->_drain_rbuf;
663 } elsif ( 662 }
663
664 if (
664 (my $err = Net::SSLeay::get_error ($self->{tls}, -1)) 665 (my $err = Net::SSLeay::get_error ($self->{tls}, -1))
665 != Net::SSLeay::ERROR_WANT_READ () 666 != Net::SSLeay::ERROR_WANT_READ ()
666 ) { 667 ) {
667 if ($err == Net::SSLeay::ERROR_SYSCALL ()) { 668 if ($err == Net::SSLeay::ERROR_SYSCALL ()) {
668 $self->error; 669 $self->error;
669 } elsif ($err == Net::SSLeay::ERROR_SSL ()) { 670 } elsif ($err == Net::SSLeay::ERROR_SSL ()) {
670 $! = &Errno::EIO; 671 $! = &Errno::EIO;
671 $self->error; 672 $self->error;
672 }
673
674 last;
675 # all others are fine for our purposes
676 } else {
677 last;
678 } 673 }
674
675 # all others are fine for our purposes
679 } 676 }
680} 677}
681 678
682# TODO: maybe document... 679# TODO: maybe document...
683sub starttls { 680sub starttls {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines