usrsock: optimize send case

Don't clear available flag if the response indicate there is more space

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
This commit is contained in:
zhanghongyu
2022-03-30 21:44:11 +08:00
committed by Masayuki Ishikawa
parent 6097f12765
commit 01fe37206a
+2 -1
View File
@@ -71,7 +71,8 @@ static uint16_t sendto_event(FAR struct net_driver_s *dev,
pstate->result = conn->resp.result;
if (pstate->result >= 0 || pstate->result == -EAGAIN)
if (!(flags & USRSOCK_EVENT_SENDTO_READY) &&
(pstate->result >= 0 || pstate->result == -EAGAIN))
{
/* After reception of data, mark input not ready. Daemon will
* send event to restore this flag.