r8153 - in /branches/upstream/libnet-lite-ftp-perl/current: Changes lib/Net/Lite/FTP.pm
gregoa-guest at users.alioth.debian.org
gregoa-guest at users.alioth.debian.org
Tue Oct 9 19:04:37 UTC 2007
Author: gregoa-guest
Date: Tue Oct 9 19:04:37 2007
New Revision: 8153
URL: http://svn.debian.org/wsvn/?sc=1&rev=8153
Log:
[svn-upgrade] Integrating new upstream version, libnet-lite-ftp-perl (0.54)
Modified:
branches/upstream/libnet-lite-ftp-perl/current/Changes
branches/upstream/libnet-lite-ftp-perl/current/lib/Net/Lite/FTP.pm
Modified: branches/upstream/libnet-lite-ftp-perl/current/Changes
URL: http://svn.debian.org/wsvn/branches/upstream/libnet-lite-ftp-perl/current/Changes?rev=8153&op=diff
==============================================================================
--- branches/upstream/libnet-lite-ftp-perl/current/Changes (original)
+++ branches/upstream/libnet-lite-ftp-perl/current/Changes Tue Oct 9 19:04:37 2007
@@ -1,5 +1,10 @@
Revision history for Perl extension Net::Lite::FTP.
+0.54 - sub readln, fix for:
+ OPEN.Received: 220 xanax.wig.lublin.pl FTP server (Version 6.SRV Response: 220 xanax.wig.lublin.pl FTP server (Version 6.RECV: 220 xanax.wig.lublin.pl FTP server (Version 6.OPEN..Received: xanax.wig.lublin.pl FTP server (Version 6.Sending: USER anica
+ SRV Response: 00LS) ready.
+
+0.52 - cosmetic fix to size()
0.51 - cosmetic fix to size()
0.50 - oups, fix size()
0.49 - if ($sth=0) instead of $sth==0 fixed.
Modified: branches/upstream/libnet-lite-ftp-perl/current/lib/Net/Lite/FTP.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libnet-lite-ftp-perl/current/lib/Net/Lite/FTP.pm?rev=8153&op=diff
==============================================================================
--- branches/upstream/libnet-lite-ftp-perl/current/lib/Net/Lite/FTP.pm (original)
+++ branches/upstream/libnet-lite-ftp-perl/current/lib/Net/Lite/FTP.pm Tue Oct 9 19:04:37 2007
@@ -27,7 +27,7 @@
);
-our $VERSION = '0.52';
+our $VERSION = '0.54';
# Preloaded methods go here.
# Autoload methods go after =cut, and are processed by the autosplit program.
use constant BUFSIZE => 4096;
@@ -78,7 +78,7 @@
sub size ($$) {
my ($self,$filename)=@_;
- my $size=$self->command("SIZE $filename");chop $size;
+ my $size=$self->command("SIZE $filename");chop $size if defined($size);
return $size;
}
sub cdup ($$) {
@@ -105,6 +105,21 @@
sub msgcode ($) {
my ($self)=@_;
return $self->{'FTPCODE'};
+};
+
+sub readln {
+ my ($sock)=@_;
+ my ($data,$ln);
+ if (sysread($sock,$data,BUFSIZE)) {
+ $ln=$data;
+ while ($data!~/\n/) {
+ if (sysread($sock,$data,BUFSIZE)) {
+ #print "OPEN..Received: {$data}\n";# if $self->{Debug};
+ $ln.=$data;
+ };
+ };
+ };
+ return $ln;
};
sub open($$$) {
@@ -115,7 +130,7 @@
$self->{'Sock'}=$sock;
$self->{'Host'}=$host;
$self->{'Port'}=$port;
- if (sysread($sock,$data,BUFSIZE)) {
+ if ($data=readln($sock)) {
print STDERR "OPEN.Received: $data" if $self->{Debug};
$data=$self->responserest($data);
print STDERR "OPEN..Received: $data" if $self->{Debug};
@@ -124,7 +139,7 @@
if ($self->{'Encrypt'}) {
$data="AUTH TLS\r\n";
syswrite($sock,$data);
- if (sysread($sock,$data,BUFSIZE)) {
+ if ($data=readln($sock)) {
print STDERR "Received: $data" if $self->{Debug};
}
}
@@ -318,6 +333,7 @@
my $response=$self->response();
print STDERR "resp(after$stororappe) ",$response if $self->{Debug};
if (defined $self->{'PutDoneCallBack'}) {$self->{'PutDoneCallBack'}->($response);};
+ return $self->{'FTPRAWMSG'};
};
sub put {
putblat('put','STOR', at _);
More information about the Pkg-perl-cvs-commits
mailing list