Skip to content

Commit

Permalink
Merge branch 'bugfix/cpp_compilation' into 'master'
Browse files Browse the repository at this point in the history
Fix: Compilation in C++ with multiple subscribe

See merge request espressif/esp-mqtt!171

(cherry picked from commit 88413ec3f27102daa805ae1992dd145b42d4690d)

47da99fb Fix: Compilation in C++ with multiple subscribe
  • Loading branch information
euripedesrocha committed Jun 1, 2023
1 parent b2bd8e5 commit 70cbaca
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions include/mqtt_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,11 @@ esp_err_t esp_mqtt_client_disconnect(esp_mqtt_client_handle_t client);
esp_err_t esp_mqtt_client_stop(esp_mqtt_client_handle_t client);


#ifdef __cplusplus

#define esp_mqtt_client_subscribe esp_mqtt_client_subscribe_single

#else
/**
* @brief Convenience macro to select subscribe function to use.
*
Expand All @@ -445,6 +450,7 @@ esp_err_t esp_mqtt_client_stop(esp_mqtt_client_handle_t client);
esp_mqtt_topic_t*: esp_mqtt_client_subscribe_multiple \
)(client_handle, topic_type, qos_or_size)

#endif /* __cplusplus*/
/**
* @brief Subscribe the client to defined topic with defined qos
*
Expand Down

0 comments on commit 70cbaca

Please sign in to comment.