A small footprint MQTT library
Dependents: STM32F746_iothub_client_sample_mqtt FXOS8700CQ_To_Azure_IoT f767zi_mqtt FXOS8700CQ_To_Azure_IoT ... more
Diff: mqtt_message.c
- Revision:
- 20:a8254fa69b6c
- Parent:
- 18:6d13ad04e8a0
- Child:
- 30:712bcbf21afa
--- a/mqtt_message.c Mon Sep 11 09:23:23 2017 -0700 +++ b/mqtt_message.c Sat Oct 21 20:12:49 2017 +0000 @@ -80,6 +80,7 @@ if (mallocAndStrcpy_s(&result->topicName, topicName) != 0) { /* Codes_SRS_MQTTMESSAGE_07_003: [If any memory allocation fails mqttmessage_create shall free any allocated memory and return NULL.] */ + LogError("Failure allocating topic name"); free(result); result = NULL; } @@ -98,6 +99,7 @@ if (result->appPayload.message == NULL) { /* Codes_SRS_MQTTMESSAGE_07_003: [If any memory allocation fails mqttmessage_create shall free any allocated memory and return NULL.] */ + LogError("Failure allocating message value of %uz", appMsgLength); free(result->topicName); free(result); result = NULL;