Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for disconnect callback #69

Merged
merged 2 commits into from
May 25, 2018
Merged

Conversation

dgarske
Copy link
Contributor

@dgarske dgarske commented May 16, 2018

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
@@ -141,6 +151,11 @@ int mqttclient_test(MQTTCtx *mqttCtx)
}
mqttCtx->client.ctx = mqttCtx;

#ifdef WOLFMQTT_DISCONNECT_CB
/* setup disconnect callback */
MqttClient_SetDisconnectCallback(&mqttCtx->client, mqtt_disconnect_cb, NULL);
Copy link
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

rc != MQTT_CODE_STDIN_WAKE)
{
/* don't use return code for now - future use */
client->disconnect_cb(client, rc, client->disconnect_ctx);
Copy link
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
Copy link
Contributor Author

dgarske commented May 24, 2018

@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.

None yet

2 participants