r61162 - in /trunk/libnet-stomp-perl: CHANGES MANIFEST.SKIP META.yml Makefile.PL debian/changelog debian/control debian/copyright lib/Net/Stomp.pm lib/Net/Stomp/Frame.pm
ansgar-guest at users.alioth.debian.org
ansgar-guest at users.alioth.debian.org
Wed Aug 4 07:53:42 UTC 2010
Author: ansgar-guest
Date: Wed Aug 4 07:53:29 2010
New Revision: 61162
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=61162
Log:
* New upstream release.
* Remove build-dep on perl (>= 5.10) | libmodule-build-perl:
stable has perl 5.10.
* Bump build-dep on debhelper to >= 7.3.7 for --buildsystem option.
* debian/copyright: Refer to /usr/share/common-licenses/GPL-1.
* Bump Standards-Version to 3.9.1.
Modified:
trunk/libnet-stomp-perl/CHANGES
trunk/libnet-stomp-perl/MANIFEST.SKIP
trunk/libnet-stomp-perl/META.yml
trunk/libnet-stomp-perl/Makefile.PL
trunk/libnet-stomp-perl/debian/changelog
trunk/libnet-stomp-perl/debian/control
trunk/libnet-stomp-perl/debian/copyright
trunk/libnet-stomp-perl/lib/Net/Stomp.pm
trunk/libnet-stomp-perl/lib/Net/Stomp/Frame.pm
Modified: trunk/libnet-stomp-perl/CHANGES
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-stomp-perl/CHANGES?rev=61162&op=diff
==============================================================================
--- trunk/libnet-stomp-perl/CHANGES (original)
+++ trunk/libnet-stomp-perl/CHANGES Wed Aug 4 07:53:29 2010
@@ -1,4 +1,9 @@
Revision history for Perl module Net::Stomp:
+
+0.38 Tue Aug 03 13:58:10 BST 2010
+ - Fix an issue with IO::Handle buffering interfering with IO::Select. This
+ manifested as receive_frame hanging, or as if not all messages would get
+ delivered to the client. (RT 44629)
0.37 Fri May 28 15:26:17 BST 2010
- Report a proper error if non-SSL STOMP server is not listening rather than
Modified: trunk/libnet-stomp-perl/MANIFEST.SKIP
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-stomp-perl/MANIFEST.SKIP?rev=61162&op=diff
==============================================================================
--- trunk/libnet-stomp-perl/MANIFEST.SKIP (original)
+++ trunk/libnet-stomp-perl/MANIFEST.SKIP Wed Aug 4 07:53:29 2010
@@ -3,6 +3,8 @@
^Build$
^Makefile
+^\.DS_Store
+^Net-Stomp-.*
\.tar\.gz$
^\.git
\.swp$
Modified: trunk/libnet-stomp-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-stomp-perl/META.yml?rev=61162&op=diff
==============================================================================
--- trunk/libnet-stomp-perl/META.yml (original)
+++ trunk/libnet-stomp-perl/META.yml Wed Aug 4 07:53:29 2010
@@ -4,7 +4,7 @@
- "Leon Brocard <acme at astray.com>.\nThom May <thom.may at betfair.com>.\nAsh Berlin <ash_github at firemirror.com>."
configure_requires:
Module::Build: 0.36
-generated_by: 'Module::Build version 0.3607'
+generated_by: 'Module::Build version 0.3603'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -13,7 +13,7 @@
provides:
Net::Stomp:
file: lib/Net/Stomp.pm
- version: 0.37
+ version: 0.38
Net::Stomp::Frame:
file: lib/Net/Stomp/Frame.pm
requires:
@@ -22,4 +22,4 @@
IO::Socket::INET: 0
resources:
license: http://dev.perl.org/licenses/
-version: 0.37
+version: 0.38
Modified: trunk/libnet-stomp-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-stomp-perl/Makefile.PL?rev=61162&op=diff
==============================================================================
--- trunk/libnet-stomp-perl/Makefile.PL (original)
+++ trunk/libnet-stomp-perl/Makefile.PL Wed Aug 4 07:53:29 2010
@@ -1,4 +1,4 @@
-# Note: this file was auto-generated by Module::Build::Compat version 0.3607
+# Note: this file was auto-generated by Module::Build::Compat version 0.3603
use ExtUtils::MakeMaker;
WriteMakefile
(
Modified: trunk/libnet-stomp-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-stomp-perl/debian/changelog?rev=61162&op=diff
==============================================================================
--- trunk/libnet-stomp-perl/debian/changelog (original)
+++ trunk/libnet-stomp-perl/debian/changelog Wed Aug 4 07:53:29 2010
@@ -1,3 +1,14 @@
+libnet-stomp-perl (0.38-1) unstable; urgency=low
+
+ * New upstream release.
+ * Remove build-dep on perl (>= 5.10) | libmodule-build-perl:
+ stable has perl 5.10.
+ * Bump build-dep on debhelper to >= 7.3.7 for --buildsystem option.
+ * debian/copyright: Refer to /usr/share/common-licenses/GPL-1.
+ * Bump Standards-Version to 3.9.1.
+
+ -- Ansgar Burchardt <ansgar at 43-1.org> Wed, 04 Aug 2010 16:52:21 +0900
+
libnet-stomp-perl (0.37-1) unstable; urgency=low
* New upstream release.
Modified: trunk/libnet-stomp-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-stomp-perl/debian/control?rev=61162&op=diff
==============================================================================
--- trunk/libnet-stomp-perl/debian/control (original)
+++ trunk/libnet-stomp-perl/debian/control Wed Aug 4 07:53:29 2010
@@ -1,14 +1,14 @@
Source: libnet-stomp-perl
Section: perl
Priority: optional
-Build-Depends: debhelper (>= 7.0.50~), perl (>= 5.10) | libmodule-build-perl
+Build-Depends: debhelper (>= 7.3.7~)
Build-Depends-Indep: perl, libclass-accessor-perl,
libtest-pod-perl, libtest-pod-coverage-perl
Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
Uploaders: Krzysztof Krzyżaniak (eloy) <eloy at debian.org>,
Sebastien Aperghis-Tramoni <sebastien at aperghis.net>,
Ansgar Burchardt <ansgar at 43-1.org>
-Standards-Version: 3.9.0
+Standards-Version: 3.9.1
Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libnet-stomp-perl/
Vcs-Browser: http://svn.debian.org/viewsvn/pkg-perl/trunk/libnet-stomp-perl/
Homepage: http://search.cpan.org/dist/Net-Stomp/
Modified: trunk/libnet-stomp-perl/debian/copyright
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-stomp-perl/debian/copyright?rev=61162&op=diff
==============================================================================
--- trunk/libnet-stomp-perl/debian/copyright (original)
+++ trunk/libnet-stomp-perl/debian/copyright Wed Aug 4 07:53:29 2010
@@ -3,7 +3,6 @@
Source: http://search.cpan.org/dist/Net-Stomp/
Name: Net-Stomp
-Files: *
Copyright:
2006-2009, Leon Brocard <acme at astray.com>
2009, Thom May, Betfair.com <thom.may at betfair.com>
@@ -18,15 +17,17 @@
License: Artistic or GPL-1+
License: Artistic
- This program is free software; you can redistribute it and/or modify
- it under the terms of the Artistic License, which comes with Perl.
- On Debian GNU/Linux systems, the complete text of the Artistic License
- can be found in `/usr/share/common-licenses/Artistic'
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the Artistic License, which comes with Perl.
+ .
+ On Debian GNU/Linux systems, the complete text of the Artistic License
+ can be found in `/usr/share/common-licenses/Artistic'.
License: GPL-1+
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 1, or (at your option)
- any later version.
- On Debian GNU/Linux systems, the complete text of the GNU General
- Public License can be found in `/usr/share/common-licenses/GPL'
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 1, or (at your option)
+ any later version.
+ .
+ On Debian GNU/Linux systems, the complete text of version 1 of the GNU
+ General Public License can be found in `/usr/share/common-licenses/GPL-1'.
Modified: trunk/libnet-stomp-perl/lib/Net/Stomp.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-stomp-perl/lib/Net/Stomp.pm?rev=61162&op=diff
==============================================================================
--- trunk/libnet-stomp-perl/lib/Net/Stomp.pm (original)
+++ trunk/libnet-stomp-perl/lib/Net/Stomp.pm Wed Aug 4 07:53:29 2010
@@ -6,7 +6,7 @@
use Net::Stomp::Frame;
use Carp;
use base 'Class::Accessor::Fast';
-our $VERSION = '0.37';
+our $VERSION = '0.38';
__PACKAGE__->mk_accessors( qw(
_cur_host failover hostname hosts port select serial session_id socket ssl
ssl_options subscriptions _connect_headers
Modified: trunk/libnet-stomp-perl/lib/Net/Stomp/Frame.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-stomp-perl/lib/Net/Stomp/Frame.pm?rev=61162&op=diff
==============================================================================
--- trunk/libnet-stomp-perl/lib/Net/Stomp/Frame.pm (original)
+++ trunk/libnet-stomp-perl/lib/Net/Stomp/Frame.pm Wed Aug 4 07:53:29 2010
@@ -42,6 +42,23 @@
$frame .= "\000";
}
+# NBK - $sock->getline does buffered IO which screws up select. Use
+# sysread one char at a time to avoid reading part of the next line.
+sub _readline {
+ my($self, $socket, $terminator, $msg) = @_;
+
+ $terminator = "\n" unless defined($terminator);
+ $msg ||= "";
+
+ my $s = "";
+ while( 1 ) {
+ $socket->sysread($s, 1, length($s)) or die("Error reading $msg: $!");
+ last if substr($s, -1) eq $terminator;
+ }
+
+ return $s;
+}
+
sub parse {
my ( $package, $socket ) = @_;
local $/ = "\n";
@@ -49,7 +66,7 @@
# read the command
my $command;
while (1) {
- $command = $socket->getline || die "Error reading command: $!";
+ $command = $package->_readline($socket, "\n", "command");
chop $command;
last if $command;
}
@@ -57,31 +74,29 @@
# read headers
my $headers;
while (1) {
- my $line = $socket->getline || die "Error reading header: $!";
+ my $line = $package->_readline($socket, "\n", "header");
chop $line;
last if $line eq "";
- my ( $key, $value ) = split /: ?/, $line, 2;
+ my ( $key, $value ) = split(/: ?/, $line, 2);
$headers->{$key} = $value;
}
# read the body
my $body;
+ my $c;
if ( $headers->{"content-length"} ) {
- $socket->read( $body, $headers->{"content-length"} )
+ $socket->sysread( $body, $headers->{"content-length"} + 1 )
|| die "Error reading body: $!";
- $socket->getc; # eat the trailing null
$headers->{bytes_message} = 1;
} else {
- while (1) {
- my $byte = $socket->getc;
- die "Error reading body: $!" unless defined $byte;
- last if $byte eq "\000";
- $body .= $byte;
- }
+ $body = $package->_readline($socket, "\000", "body");
}
-
+ # strip trailing null
+ $body =~ s/\000$//;
+
my $frame = Net::Stomp::Frame->new(
{ command => $command, headers => $headers, body => $body } );
+
return $frame;
}
More information about the Pkg-perl-cvs-commits
mailing list