forked from espressif/esp-mqtt
fixed compiler errors for SSL mode
This commit is contained in:
@@ -6,6 +6,9 @@
|
|||||||
#include "mqtt_msg.h"
|
#include "mqtt_msg.h"
|
||||||
#include "ringbuf.h"
|
#include "ringbuf.h"
|
||||||
|
|
||||||
|
#if defined(CONFIG_MQTT_SECURITY_ON)
|
||||||
|
#include "openssl/ssl.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct mqtt_client mqtt_client;
|
typedef struct mqtt_client mqtt_client;
|
||||||
typedef struct mqtt_event_data_t mqtt_event_data_t;
|
typedef struct mqtt_event_data_t mqtt_event_data_t;
|
||||||
|
5
mqtt.c
5
mqtt.c
@@ -13,9 +13,6 @@
|
|||||||
#include "lwip/sockets.h"
|
#include "lwip/sockets.h"
|
||||||
#include "lwip/dns.h"
|
#include "lwip/dns.h"
|
||||||
#include "lwip/netdb.h"
|
#include "lwip/netdb.h"
|
||||||
#if defined(CONFIG_MQTT_SECURITY_ON)
|
|
||||||
#include "openssl/ssl.h"
|
|
||||||
#endif
|
|
||||||
#include "ringbuf.h"
|
#include "ringbuf.h"
|
||||||
#include "mqtt.h"
|
#include "mqtt.h"
|
||||||
|
|
||||||
@@ -222,7 +219,7 @@ int mqtt_write(mqtt_client *client, const void *buffer, int len, int timeout_ms)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(CONFIG_MQTT_SECURITY_ON)
|
#if defined(CONFIG_MQTT_SECURITY_ON)
|
||||||
result = SSL_write(client->ssl, buffer, len)
|
result = SSL_write(client->ssl, buffer, len);
|
||||||
#else
|
#else
|
||||||
result = write(client->socket, buffer, len);
|
result = write(client->socket, buffer, len);
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user