mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 08:36:24 +08:00
net/local: Return the partial write size
N/A Fix up that local socket will be endless loop when write data size more than the fifo size. Signed-off-by: 丁欣童 <dingxintong@xiaomi.com> Change-Id: I69d63b7b156f0714333e7103bb266b7fcb1adf03
This commit is contained in:
@@ -98,7 +98,7 @@ static int local_fifo_write(FAR struct file *filep, FAR const uint8_t *buf,
|
|||||||
nwritten += ret;
|
nwritten += ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
return nwritten;
|
return nwritten > 0 ? nwritten : ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|||||||
Reference in New Issue
Block a user