From b5b0605e2aaded8b01647f909a62314e8e8f1d2c Mon Sep 17 00:00:00 2001 From: pennam Date: Tue, 25 Jun 2024 16:13:54 +0200 Subject: [PATCH] Initialize otaClient to nullptr as default --- src/ArduinoIoTCloudTCP.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ArduinoIoTCloudTCP.h b/src/ArduinoIoTCloudTCP.h index 3f435d78..61dc9942 100644 --- a/src/ArduinoIoTCloudTCP.h +++ b/src/ArduinoIoTCloudTCP.h @@ -75,7 +75,7 @@ class ArduinoIoTCloudTCP: public ArduinoIoTCloudClass virtual void printDebugInfo() override; int begin(ConnectionHandler & connection, bool const enable_watchdog = true, String brokerAddress = DEFAULT_BROKER_ADDRESS_SECURE_AUTH, uint16_t brokerPort = DEFAULT_BROKER_PORT_SECURE_AUTH); - int begin(Client * mqttClient, Client * otaClient, bool const enable_watchdog = true, String brokerAddress = DEFAULT_BROKER_ADDRESS_SECURE_AUTH, uint16_t brokerPort = DEFAULT_BROKER_PORT_SECURE_AUTH); + int begin(Client * mqttClient, Client * otaClient = nullptr, bool const enable_watchdog = true, String brokerAddress = DEFAULT_BROKER_ADDRESS_SECURE_AUTH, uint16_t brokerPort = DEFAULT_BROKER_PORT_SECURE_AUTH); #ifdef BOARD_HAS_SECRET_KEY inline void setBoardId (String const device_id) { setDeviceId(device_id); }