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:
parent
896619ad40
commit
56101c3c9a
1 changed files with 2 additions and 0 deletions
|
@ -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)",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue