in src/mqtt_client.c [472:487]
static void onBytesReceived(void* context, const unsigned char* buffer, size_t size)
{
MQTT_CLIENT* mqtt_client = (MQTT_CLIENT*)context;
if (mqtt_client != NULL)
{
if (mqtt_codec_bytesReceived(mqtt_client->codec_handle, buffer, size) != 0)
{
mqtt_codec_reset(mqtt_client->codec_handle);
set_error_callback(mqtt_client, MQTT_CLIENT_PARSE_ERROR);
}
}
else
{
LogError("Error: mqtt_client is NULL");
}
}