mqtt: fix: Remove ping function call

Zephyr's MQTT does not implement a client's message queue.
So, a race-condition may be present when multiple messages are
received and processed.

We remove the pinreq function call to allow the mqtt_read function
to handle all the incoming messages.

CONFIG_IP_BUF_RX_SIZE is also updated to allow more messages to be
queued by the IP stack.

Jira: ZEP-669

Change-Id: Ie3ef55b17020e04c6540adf975a66fb004933914
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
This commit is contained in:
Flavio Santes 2016-08-09 12:04:35 -05:00 committed by Inaky Perez-Gonzalez
commit b564ee6d76
2 changed files with 1 additions and 7 deletions

View file

@ -9,11 +9,9 @@ CONFIG_NETWORKING_WITH_TCP=y
CONFIG_NETWORKING_WITH_IPV4=y CONFIG_NETWORKING_WITH_IPV4=y
CONFIG_NETWORKING_IPV6_NO_ND=y CONFIG_NETWORKING_IPV6_NO_ND=y
CONFIG_IP_BUF_RX_SIZE=4 CONFIG_IP_BUF_RX_SIZE=16
CONFIG_IP_BUF_TX_SIZE=4 CONFIG_IP_BUF_TX_SIZE=4
CONFIG_NETZ=y
# Uncomment the following variables for debugging # Uncomment the following variables for debugging
#CONFIG_NETWORKING_WITH_LOGGING=y #CONFIG_NETWORKING_WITH_LOGGING=y

View file

@ -100,10 +100,6 @@ void fiber(void)
do { do {
printf("\n--------------------------------\n"); printf("\n--------------------------------\n");
rc = mqtt_pingreq(&app_ctx);
printf("Pingreq, rc: %s\n", RC_STR(rc));
fiber_sleep(SLEEP_TIME);
mqtt_read(&app_ctx); mqtt_read(&app_ctx);
fiber_sleep(SLEEP_TIME); fiber_sleep(SLEEP_TIME);