From 45302cf00f6e585cba5ff1df6759de2c50e3d968 Mon Sep 17 00:00:00 2001 From: Alan Antonuk Date: Sat, 2 Aug 2014 21:52:09 -0700 Subject: FIX: don't range-check channel_ids. Even if a channel_max is specified, channel_ids can be any number, so don't range-check channel_ids received. At present this gets rabbitmq-c back into compliance with the way the RabbitMQ broker works. See issue #187, #195 To correctly enforce channel_max from the client side, rabbitmq-c would need to track open channels, which is a bit more involved to do correctly. --- librabbitmq/amqp_connection.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/librabbitmq/amqp_connection.c b/librabbitmq/amqp_connection.c index cb82e46..88136cd 100644 --- a/librabbitmq/amqp_connection.c +++ b/librabbitmq/amqp_connection.c @@ -279,10 +279,6 @@ int amqp_handle_input(amqp_connection_state_t state, /* frame length is 3 bytes in */ channel = amqp_d16(raw_frame, 1); - if ((int)channel > state->channel_max) { - return AMQP_STATUS_BAD_AMQP_DATA; - } - state->target_size = amqp_d32(raw_frame, 3) + HEADER_SIZE + FOOTER_SIZE; -- cgit v1.2.1