Permalink
Browse files

Provide some minimal client properties

  • Loading branch information...
dpw committed Oct 13, 2011
1 parent 5b925d5 commit 2edff50c851c1dff603b5add904d56436b1dcd4e
Showing with 13 additions and 2 deletions.
  1. +13 −2 librabbitmq/amqp_socket.c
View
@@ -398,15 +398,26 @@ static int amqp_login_inner(amqp_connection_state_t state,
}
{
+ amqp_table_entry_t properties[2];
amqp_connection_start_ok_t s;
amqp_bytes_t response_bytes = sasl_response(&state->decoding_pool,
sasl_method, vl);
if (response_bytes.bytes == NULL)
return -ERROR_NO_MEMORY;
- s.client_properties.num_entries = 0;
- s.client_properties.entries = NULL;
+ properties[0].key = amqp_cstring_bytes("product");
+ properties[0].value.kind = AMQP_FIELD_KIND_UTF8;
+ properties[0].value.value.bytes
+ = amqp_cstring_bytes("rabbitmq-c");
+
+ properties[1].key = amqp_cstring_bytes("information");
+ properties[1].value.kind = AMQP_FIELD_KIND_UTF8;
+ properties[1].value.value.bytes
+ = amqp_cstring_bytes("See http://hg.rabbitmq.com/rabbitmq-c/");
+
+ s.client_properties.num_entries = 2;
+ s.client_properties.entries = properties;
s.mechanism = sasl_method_name(sasl_method);
s.response = response_bytes;
s.locale.bytes = "en_US";

0 comments on commit 2edff50

Please sign in to comment.