[libanyevent-rabbitmq-perl] 19/151: Fixed a bug.

Damyan Ivanov dmn at moszumanska.debian.org
Thu Jan 16 11:03:00 UTC 2014


This is an automated email from the git hooks/post-receive script.

dmn pushed a commit to annotated tag debian/1.12-1
in repository libanyevent-rabbitmq-perl.

commit 7dd18aa718d4af0248004aef659eed6d51214118
Author: cooldaemon <cooldaemon at gmail.com>
Date:   Thu Feb 11 21:08:01 2010 +0900

    Fixed a bug.
---
 lib/AnyEvent/RabbitMQ.pm         | 7 +++----
 lib/AnyEvent/RabbitMQ/Channel.pm | 3 +--
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/lib/AnyEvent/RabbitMQ.pm b/lib/AnyEvent/RabbitMQ.pm
index 9496192..ef303ba 100644
--- a/lib/AnyEvent/RabbitMQ.pm
+++ b/lib/AnyEvent/RabbitMQ.pm
@@ -54,7 +54,6 @@ has channels => (
     provides  => {
         set    => 'set_channel',
         get    => 'get_channel',
-        empty  => 'has_channels',
         delete => 'delete_channel',
         keys   => 'channel_ids',
         count  => 'count_channels',
@@ -147,7 +146,7 @@ sub _read_loop {
             my $id = $frame->channel;
             if (0 == $id) {
                 $self->_queue->push($frame);
-            } elsif ($self->has_channels($id)) {
+            } elsif ($self->get_channel($id)) {
                 $self->get_channel($id)->_push_queue_or_consume($frame, $failure_cb);
             } else {
                 $failure_cb->('Unknown channel id: ' . $frame->channel);
@@ -359,11 +358,11 @@ sub open_channel {
 
     my $id = $args{id};
     return $args{on_failure}->("Channel id $id is already in use")
-        if $id && $self->has_channels($id);
+        if $id && $self->get_channel($id);
 
     if (!$id) {
         for my $candidate_id (1 .. (2**16 - 1)) { # FIXME
-            next if $self->has_channels($candidate_id);
+            next if $self->get_channel($candidate_id);
             $id = $candidate_id;
             last;
         }
diff --git a/lib/AnyEvent/RabbitMQ/Channel.pm b/lib/AnyEvent/RabbitMQ/Channel.pm
index 2ba63b2..fe34511 100644
--- a/lib/AnyEvent/RabbitMQ/Channel.pm
+++ b/lib/AnyEvent/RabbitMQ/Channel.pm
@@ -41,7 +41,6 @@ has consumer_cbs => (
     provides  => {
         set    => 'set_consumer_cbs',
         get    => 'get_consumer_cbs',
-        empty  => 'has_consumer_cbs',
         delete => 'delete_consumer_cbs',
         keys   => 'consumer_tags',
         count  => 'count_consumer_cbs',
@@ -401,7 +400,7 @@ sub cancel {
         if !defined $args{consumer_tag};
 
     return $failure_cb->('Unknown consumer_tag')
-        if !$self->has_consumer_cbs($args{consumer_tag});
+        if !$self->get_consumer_cbs($args{consumer_tag});
 
     $self->connection->_push_write_and_read(
         'Basic::Cancel',

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libanyevent-rabbitmq-perl.git



More information about the Pkg-perl-cvs-commits mailing list