Use mosquitto_strerror() instead of displaying the rc.

This commit is contained in:
Roger A. Light 2015-08-17 11:59:29 +01:00
parent 4c147309a4
commit 6f88ba3225

View File

@ -760,7 +760,7 @@ int client_connect(struct mosquitto *mosq, struct mosq_config *cfg)
#endif #endif
fprintf(stderr, "Error: %s\n", err); fprintf(stderr, "Error: %s\n", err);
}else{ }else{
fprintf(stderr, "Unable to connect (%d).\n", rc); fprintf(stderr, "Unable to connect (%s).\n", mosquitto_strerror(rc));
} }
} }
mosquitto_lib_cleanup(); mosquitto_lib_cleanup();