Commit 55a48093 authored by 957dd's avatar 957dd

Update mqtt.c

parent dfde8e1f
...@@ -35,7 +35,7 @@ int mqtt_init() ...@@ -35,7 +35,7 @@ int mqtt_init()
{ {
// 初始化 mosquitto 库 // 初始化 mosquitto 库
mosquitto_lib_init(); mosquitto_lib_init();
mosq = mosquitto_new(CLIENT_ID, true, NULL); mosq = mosquitto_new(NULL, true, NULL);
if (!mosq) { if (!mosq) {
fprintf(stderr, "Failed to create Mosquitto client\n"); fprintf(stderr, "Failed to create Mosquitto client\n");
return -1; return -1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment