net: tcp: Add DEBUGASSERT() in psock_tcp_send()
Summary: - This commit adds DEBUGASSERT() to check the IOB size Impact: - None Testing: - Tested with sabre-6quad:netnsh with QEMU Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
This commit is contained in:
parent
07e7ccb80c
commit
ec8bf5c8c1
@ -1144,6 +1144,11 @@ ssize_t psock_tcp_send(FAR struct socket *psock, FAR const void *buf,
|
||||
*/
|
||||
|
||||
blresult = net_breaklock(&count);
|
||||
|
||||
/* NOTE: At least IOB needs to hold the packet */
|
||||
|
||||
DEBUGASSERT((CONFIG_IOB_NBUFFERS * CONFIG_IOB_BUFSIZE) > len);
|
||||
|
||||
result = TCP_WBCOPYIN(wrb, (FAR uint8_t *)buf, len);
|
||||
if (blresult >= 0)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user