summaryrefslogtreecommitdiff
path: root/librabbitmq
diff options
context:
space:
mode:
Diffstat (limited to 'librabbitmq')
-rw-r--r--librabbitmq/amqp.h3
-rw-r--r--librabbitmq/amqp_api.c5
-rw-r--r--librabbitmq/amqp_socket.c11
-rw-r--r--librabbitmq/codegen.py1
4 files changed, 15 insertions, 5 deletions
diff --git a/librabbitmq/amqp.h b/librabbitmq/amqp.h
index 9981275..e9e8268 100644
--- a/librabbitmq/amqp.h
+++ b/librabbitmq/amqp.h
@@ -444,7 +444,8 @@ extern struct amqp_basic_consume_ok_t_ *amqp_basic_consume(amqp_connection_state
amqp_bytes_t consumer_tag,
amqp_boolean_t no_local,
amqp_boolean_t no_ack,
- amqp_boolean_t exclusive);
+ amqp_boolean_t exclusive,
+ amqp_table_t filter);
extern int amqp_basic_ack(amqp_connection_state_t state,
amqp_channel_t channel,
diff --git a/librabbitmq/amqp_api.c b/librabbitmq/amqp_api.c
index 66b1f3d..5eedf7b 100644
--- a/librabbitmq/amqp_api.c
+++ b/librabbitmq/amqp_api.c
@@ -223,12 +223,13 @@ amqp_basic_consume_ok_t *amqp_basic_consume(amqp_connection_state_t state,
amqp_bytes_t consumer_tag,
amqp_boolean_t no_local,
amqp_boolean_t no_ack,
- amqp_boolean_t exclusive)
+ amqp_boolean_t exclusive,
+ amqp_table_t filter)
{
state->most_recent_api_result =
AMQP_SIMPLE_RPC(state, channel, BASIC, CONSUME, CONSUME_OK,
amqp_basic_consume_t,
- 0, queue, consumer_tag, no_local, no_ack, exclusive, 0);
+ 0, queue, consumer_tag, no_local, no_ack, exclusive, 0, filter);
return RPC_REPLY(amqp_basic_consume_ok_t);
}
diff --git a/librabbitmq/amqp_socket.c b/librabbitmq/amqp_socket.c
index 09dc841..45212e9 100644
--- a/librabbitmq/amqp_socket.c
+++ b/librabbitmq/amqp_socket.c
@@ -100,10 +100,17 @@ static char *header() {
header[1] = 'M';
header[2] = 'Q';
header[3] = 'P';
+#ifndef USE_MODERN_AMQP_PROTOCOL_HEADER
header[4] = 1;
header[5] = 1;
header[6] = AMQP_PROTOCOL_VERSION_MAJOR;
header[7] = AMQP_PROTOCOL_VERSION_MINOR;
+#else
+ header[4] = 0;
+ header[5] = AMQP_PROTOCOL_VERSION_MAJOR;
+ header[6] = AMQP_PROTOCOL_VERSION_MINOR;
+ header[7] = AMQP_PROTOCOL_VERSION_REVISION;
+#endif
return header;
}
@@ -446,8 +453,8 @@ amqp_rpc_reply_t amqp_login(amqp_connection_state_t state,
amqp_connection_open_t s =
(amqp_connection_open_t) {
.virtual_host = amqp_cstring_bytes(vhost),
- .capabilities = {.len = 0, .bytes = NULL},
- .insist = 1
+ .deprecated_capabilities = {.len = 0, .bytes = NULL},
+ .deprecated_insist = 1
};
amqp_method_number_t replies[] = { AMQP_CONNECTION_OPEN_OK_METHOD, 0 };
result = amqp_simple_rpc(state,
diff --git a/librabbitmq/codegen.py b/librabbitmq/codegen.py
index 26fc8f1..8a8e5c5 100644
--- a/librabbitmq/codegen.py
+++ b/librabbitmq/codegen.py
@@ -412,6 +412,7 @@ extern "C" {
"""
print "#define AMQP_PROTOCOL_VERSION_MAJOR %d" % (spec.major)
print "#define AMQP_PROTOCOL_VERSION_MINOR %d" % (spec.minor)
+ print "#define AMQP_PROTOCOL_VERSION_REVISION %d" % (spec.revision)
print "#define AMQP_PROTOCOL_PORT %d" % (spec.port)
for (c,v,cls) in spec.constants: