From 61615d37e37495273a8aa9a00ddde4a29189cd5b Mon Sep 17 00:00:00 2001 From: Klaus K Wilting Date: Thu, 10 Dec 2020 15:09:24 +0100 Subject: [PATCH] mqttclient.cpp: fix hostname --- src/mqttclient.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/mqttclient.cpp b/src/mqttclient.cpp index 3527e4c1..7a1f3af7 100644 --- a/src/mqttclient.cpp +++ b/src/mqttclient.cpp @@ -42,8 +42,7 @@ esp_err_t mqtt_init(void) { int mqtt_connect(const char *my_host, const uint16_t my_port) { IPAddress mqtt_server_ip; - // static String clientId = "paxcounter-" + ETH.macAddress(); - static String clientId = "paxcounter-" + String(random(0xffff), HEX); + static String clientId = "paxcounter-" + ETH.macAddress(); ESP_LOGI(TAG, "MQTT name is %s", MQTT_CLIENTNAME); @@ -169,7 +168,7 @@ void mqtt_loop(void) { void mqtt_queuereset(void) { xQueueReset(MQTTSendQueue); } uint32_t mqtt_queuewaiting(void) { - return uxQueueMessagesWaitingMQTTSendQueue); + return uxQueueMessagesWaiting(MQTTSendQueue); } void setMqttIRQ(void) { xTaskNotify(irqHandlerTask, MQTT_IRQ, eSetBits); }