mqtt: Allow for empty/missing messages.
This commit is contained in:
@@ -25,7 +25,7 @@ static int _dumpPayload(uint8_t flags, const uint8_t *payloadPtr, uint32_t paylo
|
||||
|
||||
GWEN_MSG *AQH_PublishMqttMsg_new(uint8_t flags, uint16_t packetId, const char *sTopic, const uint8_t *messagePtr, uint32_t messageLen)
|
||||
{
|
||||
if (sTopic && *sTopic && messagePtr && messageLen) {
|
||||
if (sTopic && *sTopic) {
|
||||
GWEN_MSG *msg;
|
||||
GWEN_BUFFER *buf;
|
||||
|
||||
@@ -47,7 +47,7 @@ GWEN_MSG *AQH_PublishMqttMsg_new(uint8_t flags, uint16_t packetId, const char *s
|
||||
return msg;
|
||||
}
|
||||
else {
|
||||
DBG_ERROR(AQH_LOGDOMAIN, "Missing topic or message");
|
||||
DBG_ERROR(AQH_LOGDOMAIN, "Missing topic");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user