Closed mikeowens closed 10 years ago
In the process of reading through your code, I discovered that the numerical values for the AMQP_BASIC_CONTENT_ENCODING_FLAG and AMQP_BASIC_MESSAGE_ID_FLAG properties were mistakenly switched around. For reference, in amqp_frame.h you have:
#define AMQP_BASIC_CONTENT_TYPE_FLAG (1 << 15) #define AMQP_BASIC_CONTENT_ENCODING_FLAG (1 << 7) #define AMQP_BASIC_HEADERS_FLAG (1 << 13) #define AMQP_BASIC_DELIVERY_MODE_FLAG (1 << 12) #define AMQP_BASIC_PRIORITY_FLAG (1 << 11) #define AMQP_BASIC_CORRELATION_ID_FLAG (1 << 10) #define AMQP_BASIC_REPLY_TO_FLAG (1 << 9) #define AMQP_BASIC_EXPIRATION_FLAG (1 << 8) #define AMQP_BASIC_MESSAGE_ID_FLAG (1 << 14) #define AMQP_BASIC_TIMESTAMP_FLAG (1 << 6) #define AMQP_BASIC_TYPE_FLAG (1 << 5) #define AMQP_BASIC_USER_ID_FLAG (1 << 4) #define AMQP_BASIC_APP_ID_FLAG (1 << 3) #define AMQP_BASIC_CLUSTER_ID_FLAG (1 << 2)
Per the specification, the values for the 2nd and 9th line should be switch so you would have:
#define AMQP_BASIC_CONTENT_TYPE_FLAG (1 << 15) #define AMQP_BASIC_CONTENT_ENCODING_FLAG (1 << 14) #define AMQP_BASIC_HEADERS_FLAG (1 << 13) #define AMQP_BASIC_DELIVERY_MODE_FLAG (1 << 12) #define AMQP_BASIC_PRIORITY_FLAG (1 << 11) #define AMQP_BASIC_CORRELATION_ID_FLAG (1 << 10) #define AMQP_BASIC_REPLY_TO_FLAG (1 << 9) #define AMQP_BASIC_EXPIRATION_FLAG (1 << 8) #define AMQP_BASIC_MESSAGE_ID_FLAG (1 << 7) #define AMQP_BASIC_TIMESTAMP_FLAG (1 << 6) #define AMQP_BASIC_TYPE_FLAG (1 << 5) #define AMQP_BASIC_USER_ID_FLAG (1 << 4) #define AMQP_BASIC_APP_ID_FLAG (1 << 3) #define AMQP_BASIC_CLUSTER_ID_FLAG (1 << 2)
This bug should manifest itself by your content encoding and message ID values being switched around.
@mikeowens merged into qamqp-ng, thanks!
In the process of reading through your code, I discovered that the numerical values for the AMQP_BASIC_CONTENT_ENCODING_FLAG and AMQP_BASIC_MESSAGE_ID_FLAG properties were mistakenly switched around. For reference, in amqp_frame.h you have:
Per the specification, the values for the 2nd and 9th line should be switch so you would have:
This bug should manifest itself by your content encoding and message ID values being switched around.