/* Calculates an integer from two bytes read from the input buffer  */
int mqtt_read_int(unsigned char **pptr)
/* Calculates an integer from two bytes read from the input buffer  */
int mqtt_read_int(unsigned char **pptr)
{
	unsigned char* ptr = *pptr;
	int len = 256*(*ptr) + (*(ptr+1));
	*pptr += 2;
	return len;
}