Permalink
Browse files

Merge default into amqp_0_9_1

  • Loading branch information...
2 parents 83b5975 + 5606e1d commit 57beee4aadd2ba453cf39cd84a417c6f6cec1243 @tonyg tonyg committed Feb 25, 2010
View
@@ -30,7 +30,7 @@ AC_ARG_ENABLE(64-bit,
AC_MSG_CHECKING(location of AMQP codegen directory)
sibling_codegen_dir="$ac_abs_confdir/../rabbitmq-codegen"
AMQP_CODEGEN_DIR=$(test -d "$sibling_codegen_dir" && echo "$sibling_codegen_dir" || echo "$ac_abs_confdir/codegen")
-AMQP_SPEC_JSON_PATH="$AMQP_CODEGEN_DIR/amqp-0.8.json"
+AMQP_SPEC_JSON_PATH="$AMQP_CODEGEN_DIR/amqp-0.9.1.json"
if test -f "$AMQP_SPEC_JSON_PATH"
then
AC_MSG_RESULT($AMQP_CODEGEN_DIR)
View
@@ -173,7 +173,7 @@ int main(int argc, char const * const *argv) {
AMQP_EMPTY_TABLE);
die_on_amqp_error(amqp_get_rpc_reply(conn), "Binding queue");
- amqp_basic_consume(conn, 1, queuename, AMQP_EMPTY_BYTES, 0, 1, 0);
+ amqp_basic_consume(conn, 1, queuename, AMQP_EMPTY_BYTES, 0, 1, 0, AMQP_EMPTY_TABLE);
die_on_amqp_error(amqp_get_rpc_reply(conn), "Consuming");
run(conn);
View
@@ -109,7 +109,7 @@ int main(int argc, char const * const *argv) {
AMQP_EMPTY_TABLE);
die_on_amqp_error(amqp_get_rpc_reply(conn), "Binding queue");
- amqp_basic_consume(conn, 1, queuename, AMQP_EMPTY_BYTES, 0, 1, 0);
+ amqp_basic_consume(conn, 1, queuename, AMQP_EMPTY_BYTES, 0, 1, 0, AMQP_EMPTY_TABLE);
die_on_amqp_error(amqp_get_rpc_reply(conn), "Consuming");
{
View
@@ -91,7 +91,7 @@ int main(int argc, char const * const *argv) {
amqp_channel_open(conn, 1);
die_on_amqp_error(amqp_get_rpc_reply(conn), "Opening channel");
- amqp_basic_consume(conn, 1, amqp_cstring_bytes(queuename), AMQP_EMPTY_BYTES, 0, 0, 0);
+ amqp_basic_consume(conn, 1, amqp_cstring_bytes(queuename), AMQP_EMPTY_BYTES, 0, 0, 0, AMQP_EMPTY_TABLE);
die_on_amqp_error(amqp_get_rpc_reply(conn), "Consuming");
{
View
@@ -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,
View
@@ -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);
}
View
@@ -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,
View
@@ -412,6 +412,7 @@ def propDeclList(fields):
"""
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:
View
@@ -61,7 +61,7 @@ static void do_consume(amqp_connection_state_t conn, int no_ack,
const char * const *argv)
{
if (!amqp_basic_consume(conn, 1, setup_queue(conn),
- AMQP_EMPTY_BYTES, 0, no_ack, 0))
+ AMQP_EMPTY_BYTES, 0, no_ack, 0, AMQP_EMPTY_TABLE))
die_rpc(amqp_get_rpc_reply(conn), "basic.consume");
for (;;) {

0 comments on commit 57beee4

Please sign in to comment.