From 85b37ee92b701b6971f69f68baf98963612a24b0 Mon Sep 17 00:00:00 2001 From: Tijn Kooijmans Date: Fri, 21 Jul 2017 21:23:41 +0200 Subject: [PATCH] fixed compiler errors for SSL mode --- include/mqtt.h | 3 +++ mqtt.c | 5 +---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/mqtt.h b/include/mqtt.h index a54e147..53bff02 100644 --- a/include/mqtt.h +++ b/include/mqtt.h @@ -6,6 +6,9 @@ #include "mqtt_msg.h" #include "ringbuf.h" +#if defined(CONFIG_MQTT_SECURITY_ON) +#include "openssl/ssl.h" +#endif typedef struct mqtt_client mqtt_client; typedef struct mqtt_event_data_t mqtt_event_data_t; diff --git a/mqtt.c b/mqtt.c index de3180d..80c12ee 100644 --- a/mqtt.c +++ b/mqtt.c @@ -13,9 +13,6 @@ #include "lwip/sockets.h" #include "lwip/dns.h" #include "lwip/netdb.h" -#if defined(CONFIG_MQTT_SECURITY_ON) -#include "openssl/ssl.h" -#endif #include "ringbuf.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) - result = SSL_write(client->ssl, buffer, len) + result = SSL_write(client->ssl, buffer, len); #else result = write(client->socket, buffer, len); #endif