Skip to content

Added support for disconnect callback - #69

Merged
JacobBarthelmeh merged 2 commits into
wolfSSL:masterfrom
dgarske:discb
May 25, 2018
Merged

JacobBarthelmeh merged 2 commits into
wolfSSL:masterfrom
dgarske:discb

Conversation

@dgarske

@dgarske dgarske commented May 16, 2018

Copy link
Copy Markdown
Member

Enabled using WOLFMQTT_DISCONNECT_CB or ./configure --enable-discb.

@dgarske dgarske self-assigned this May 16, 2018
@dgarske dgarske assigned JacobBarthelmeh and unassigned dgarske May 21, 2018
Comment thread examples/mqttclient/mqttclient.c Outdated

#ifdef WOLFMQTT_DISCONNECT_CB
/* setup disconnect callback */
MqttClient_SetDisconnectCallback(&mqttCtx->client, mqtt_disconnect_cb, NULL);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check of return value here

Comment thread src/mqtt_packet.c Outdated
rc != MQTT_CODE_STDIN_WAKE)
{
/* don't use return code for now - future use */
client->disconnect_cb(client, rc, client->disconnect_ctx);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add NULL check for disconnect_cb here

@dgarske

dgarske commented May 24, 2018

Copy link
Copy Markdown
Member Author

@JacobBarthelmeh : Pushed fixes. Added checks for null and return code. Thanks!

@JacobBarthelmeh
JacobBarthelmeh merged commit 4d3e5c8 into wolfSSL:master May 25, 2018
@dgarske
dgarske deleted the discb branch May 25, 2018 17:50
kojo1 pushed a commit to kojo1/wolfMQTT that referenced this pull request Aug 21, 2022
Sanity check for aligned fields in manifest header

Fix confirmed (thanks @guidovranken !)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants