Adds a config flag to allow an empty client id

This commit covers a use case where the user can select to send an
empty user id.
This commit is contained in:
Euripedes Rocha
2021-10-14 11:00:45 -03:00
committed by David Cermak
parent 36de30e46d
commit 1fd50dd2cb
3 changed files with 22 additions and 12 deletions

View File

@@ -176,7 +176,11 @@ typedef struct {
const char *host; /*!< MQTT server domain (ipv4 as string) */
const char *uri; /*!< Complete MQTT broker URI */
uint32_t port; /*!< MQTT server port */
const char *client_id; /*!< default client id is ``ESP32_%CHIPID%`` where %CHIPID% are last 3 bytes of MAC address in hex format */
bool set_null_client_id; /*!< Selects a NULL client id */
const char *client_id; /*!< Set client id.
Ignored if set_null_client_id == true
If NULL set the default client id.
Default client id is ``ESP32_%CHIPID%`` where %CHIPID% are last 3 bytes of MAC address in hex format */
const char *username; /*!< MQTT username */
const char *password; /*!< MQTT password */
const char *lwt_topic; /*!< LWT (Last Will and Testament) message topic (NULL by default) */