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 <flavio.santes@intel.com>
This commit is contained in:
Flavio Santes 2016-05-31 11:17:29 -05:00
parent d1d0ee7b2d
commit 65ccf8330f

View file

@ -14,7 +14,6 @@
* limitations under the License.
*/
#include <string.h>
#include <errno.h>
#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";