From 65ccf8330faa024654195600f20831d7a30bb1a6 Mon Sep 17 00:00:00 2001 From: Flavio Santes Date: Tue, 31 May 2016 11:17:29 -0500 Subject: [PATCH] samples/net/mqtt: Fix mqtt_connect function Remove erroneous initialization of 'data' via memset. Set keep alive interval to 0. Change-Id: I5da4649985efd39b37bbbdc6ae21a856f9e40b13 Signed-off-by: Flavio Santes --- samples/net/paho_mqtt_client/src/mqtt.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/samples/net/paho_mqtt_client/src/mqtt.c b/samples/net/paho_mqtt_client/src/mqtt.c index faa19961505..cd70e2ce056 100644 --- a/samples/net/paho_mqtt_client/src/mqtt.c +++ b/samples/net/paho_mqtt_client/src/mqtt.c @@ -14,7 +14,6 @@ * limitations under the License. */ -#include #include #include "config.h" @@ -40,11 +39,9 @@ int mqtt_connect(struct net_context *ctx, char *client_name) size_t tx_len; int rc; - memset(&data, 0x00, sizeof(MQTTPacket_connectData)); - data.MQTTVersion = 4; data.clientID.cstring = client_name; - data.keepAliveInterval = 500; + data.keepAliveInterval = 0; data.cleansession = 1; data.username.cstring = "zephyr"; data.password.cstring = "1234";