Commit bde04063 authored by Juergen Kosel's avatar Juergen Kosel

Remove unused function MQTTPacket_free_packet()

The function MQTTPacket_free_packet() is not used at all.
Eliminating dead code to improve readability.
Signed-off-by: 's avatarJuergen Kosel <juergen.kosel@softing.com>
parent c459ea31
......@@ -734,22 +734,3 @@ int MQTTPacket_send_publish(Publish* pack, int dup, int qos, int retained, netwo
FUNC_EXIT_RC(rc);
return rc;
}
/**
* Free allocated storage for a various packet tyoes
* @param pack pointer to the suback packet structure
*/
void MQTTPacket_free_packet(MQTTPacket* pack)
{
FUNC_ENTRY;
if (pack->header.bits.type == PUBLISH)
MQTTPacket_freePublish((Publish*)pack);
/*else if (pack->header.type == SUBSCRIBE)
MQTTPacket_freeSubscribe((Subscribe*)pack, 1);
else if (pack->header.type == UNSUBSCRIBE)
MQTTPacket_freeUnsubscribe((Unsubscribe*)pack);*/
else
free(pack);
FUNC_EXIT;
}
......@@ -253,8 +253,6 @@ int MQTTPacket_send_pubrec(int msgid, networkHandles* net, const char* clientID)
int MQTTPacket_send_pubrel(int msgid, int dup, networkHandles* net, const char* clientID);
int MQTTPacket_send_pubcomp(int msgid, networkHandles* net, const char* clientID);
void MQTTPacket_free_packet(MQTTPacket* pack);
#if !defined(NO_BRIDGE)
#include "MQTTPacketOut.h"
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment