|
|
@ -97,7 +97,11 @@ void my_connect_callback(struct mosquitto *mosq, void *obj, int result, int flag
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}else{
|
|
|
|
}else{
|
|
|
|
if(result && !cfg.quiet){
|
|
|
|
if(result && !cfg.quiet){
|
|
|
|
fprintf(stderr, "%s\n", mosquitto_connack_string(result));
|
|
|
|
if(cfg.protocol_version == MQTT_PROTOCOL_V5){
|
|
|
|
|
|
|
|
fprintf(stderr, "%s\n", mosquitto_reason_string(result));
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
fprintf(stderr, "%s\n", mosquitto_connack_string(result));
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
mosquitto_disconnect_with_properties(mosq, 0, cfg.disconnect_props);
|
|
|
|
mosquitto_disconnect_with_properties(mosq, 0, cfg.disconnect_props);
|
|
|
|
}
|
|
|
|
}
|
|
|
|