diff --git a/examples/pub/publisher.cpp b/examples/pub/publisher.cpp index c4419be..90a6068 100644 --- a/examples/pub/publisher.cpp +++ b/examples/pub/publisher.cpp @@ -29,9 +29,9 @@ Publisher::Publisher() } -void Publisher::connect(const std::string &hostname, int portnumber, const std::string &username, const std::string &password, const std::string &topic, const std::string &message) +void Publisher::connect(const std::string &hostname, int portnumber, const std::string &username, const std::string &password, const std::string &lwt_topic, const std::string &lwt_message) { - m_mqtt_client.connect( hostname, portnumber, osdev::components::mqtt::Credentials( username, password ), osdev::components::mqtt::mqtt_LWT( topic, message ) ); + m_mqtt_client.connect( hostname, portnumber, osdev::components::mqtt::Credentials( username, password ), osdev::components::mqtt::mqtt_LWT( lwt_topic, lwt_message ) ); std::cout << "Client state : " << m_mqtt_client.state() << std::endl; } diff --git a/examples/pub/publisher.h b/examples/pub/publisher.h index 982bac8..1a76936 100644 --- a/examples/pub/publisher.h +++ b/examples/pub/publisher.h @@ -37,7 +37,7 @@ public: virtual ~Publisher() {} void connect( const std::string &hostname, int portnumber = 1883, const std::string &username = std::string(), const std::string &password = std::string() - , const std::string &topic = std::string(), const std::string &message = std::string() ); + , const std::string &lwt_topic = std::string(), const std::string &lwt_message = std::string() ); void publish( const std::string &message_topic, const std::string &message_payload ); diff --git a/include/imqttclient.h b/include/imqttclient.h index b76cc3c..b08d25f 100644 --- a/include/imqttclient.h +++ b/include/imqttclient.h @@ -60,7 +60,7 @@ public: * @param port The port to use. * @param credentials The credentials to use. */ - virtual void connect(const std::string& host, int port, const Credentials& credentials, const mqtt_LWT &lvt = mqtt_LWT() ) = 0; + virtual void connect(const std::string& host, int port, const Credentials& credentials, const mqtt_LWT &lwt = mqtt_LWT() ) = 0; /** * @brief Connect to the endpoint diff --git a/include/mqttclient.h b/include/mqttclient.h index a9dee51..12908f5 100644 --- a/include/mqttclient.h +++ b/include/mqttclient.h @@ -92,7 +92,7 @@ public: /** * @see IMqttClient */ - virtual void connect( const std::string& host, int port, const Credentials &credentials, const mqtt_LWT &lvt = mqtt_LWT() ) override; + virtual void connect( const std::string& host, int port, const Credentials &credentials, const mqtt_LWT &lwt = mqtt_LWT() ) override; /** * @see IMqttClient