/* Deserializes the supplied (wire) buffer into unsuback data  */
int MQTTDeserialize_unsuback(unsigned short *packetid, unsigned char *buf, int buflen)
/* Deserializes the supplied (wire) buffer into unsuback data  */
int MQTTDeserialize_unsuback(unsigned short *packetid, unsigned char *buf, int buflen)
{
    unsigned char type = 0;
    unsigned char dup = 0;
    int rc = 0;
    FUNC_ENTRY;
    rc = MQTTDeserialize_ack(&type, &dup, packetid, buf, buflen);
    if (type == UNSUBACK)
        rc = 1;
    FUNC_EXIT_RC(rc);
    return rc;
}