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