samples: bluetooth: ipsp: Mark accepted socket correctly in accept()

The TCP code expects that we know when the socket has called accept()
in order to continue connection attempt.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit is contained in:
Jukka Rissanen 2019-12-19 14:26:40 +02:00
commit 56101c3c9a

View file

@ -291,6 +291,8 @@ static void tcp_accepted(struct net_context *context,
NET_DBG("Accept called, context %p error %d", context, error); NET_DBG("Accept called, context %p error %d", context, error);
net_context_set_accepting(context, false);
ret = net_context_recv(context, tcp_received, 0, NULL); ret = net_context_recv(context, tcp_received, 0, NULL);
if (ret < 0) { if (ret < 0) {
LOG_ERR("Cannot receive TCP packet (family %d)", LOG_ERR("Cannot receive TCP packet (family %d)",