diff --git a/include/lwmqtt.h b/include/lwmqtt.h index 544dfd5..6fe8be7 100644 --- a/include/lwmqtt.h +++ b/include/lwmqtt.h @@ -132,8 +132,8 @@ struct lwmqtt_client_t { size_t write_buf_size, read_buf_size; uint8_t *write_buf, *read_buf; - void *callback_ref; lwmqtt_callback_t callback; + void *callback_ref; void *network; lwmqtt_network_read_t network_read; diff --git a/src/client.c b/src/client.c index 0013a6d..b07eff7 100644 --- a/src/client.c +++ b/src/client.c @@ -10,7 +10,9 @@ void lwmqtt_init(lwmqtt_client_t *client, uint8_t *write_buf, size_t write_buf_s client->write_buf_size = write_buf_size; client->read_buf = read_buf; client->read_buf_size = read_buf_size; + client->callback = NULL; + client->callback_ref = NULL; client->network = NULL; client->network_read = NULL;