A small memory footprint AMQP implimentation
Dependents: iothub_client_sample_amqp remote_monitoring simplesample_amqp
Diff: message_sender.c
- Revision:
- 17:923575db8b2d
- Parent:
- 16:22a72cf8e416
- Child:
- 18:a922a4a30a82
--- a/message_sender.c Fri Jan 13 18:40:42 2017 -0800 +++ b/message_sender.c Tue Jan 24 15:23:52 2017 -0800 @@ -2,9 +2,6 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include <stdlib.h> -#ifdef _CRTDBG_MAP_ALLOC -#include <crtdbg.h> -#endif #include <stdbool.h> #include <string.h> #include "azure_c_shared_utility/xlogging.h" @@ -348,6 +345,10 @@ { switch (message_body_type) { + default: + result = SEND_ONE_MESSAGE_ERROR; + break; + case MESSAGE_BODY_TYPE_VALUE: { if (amqpvalue_encode(body_amqp_value, encode_bytes, &payload) != 0) @@ -514,6 +515,9 @@ switch (new_link_state) { + default: + break; + case LINK_STATE_ATTACHED: if (message_sender_instance->message_sender_state == MESSAGE_SENDER_STATE_OPENING) {