From b18e6a873412665c758814c5c397eeace2b3d27d Mon Sep 17 00:00:00 2001 From: Joel Cunningham Date: Mon, 23 Oct 2017 09:05:57 -0500 Subject: [PATCH] sockets: fix missing break regression in event_callback During the refactoring in c5db278746daedcc6566822992f3f33ce3801470, the previous gotos were removed, but the lack of break statements in NETCONN_EVNT_RCVMINUS and NETCONN_EVT_SENDMINUS was overlooked, leading to incorrect fall through behavior --- src/api/sockets.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/api/sockets.c b/src/api/sockets.c index fbf4a925..6779019c 100644 --- a/src/api/sockets.c +++ b/src/api/sockets.c @@ -2449,6 +2449,7 @@ event_callback(struct netconn *conn, enum netconn_evt evt, u16_t len) case NETCONN_EVT_RCVMINUS: sock->rcvevent--; check_waiters = 0; + break; case NETCONN_EVT_SENDPLUS: if (sock->sendevent) { check_waiters = 0; @@ -2458,6 +2459,7 @@ event_callback(struct netconn *conn, enum netconn_evt evt, u16_t len) case NETCONN_EVT_SENDMINUS: sock->sendevent = 0; check_waiters = 0; + break; case NETCONN_EVT_ERROR: sock->errevent = 1; break;