Skip to content

Commit 037037c

Browse files
jukkarnashif
authored andcommitted
net: context: Return -ENOBUFS to caller if we run out of bufs
The socket layer expects to receive -ENOBUFS if we do not have any network buffers so cannot build a network message to be sent. Signed-off-by: Jukka Rissanen <[email protected]>
1 parent 3db319f commit 037037c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

subsys/net/ip/net_context.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1530,7 +1530,7 @@ static int context_sendto(struct net_context *context,
15301530

15311531
pkt = context_alloc_pkt(context, len, PKT_WAIT_TIME);
15321532
if (!pkt) {
1533-
return -ENOMEM;
1533+
return -ENOBUFS;
15341534
}
15351535

15361536
tmp_len = net_pkt_available_payload_buffer(

0 commit comments

Comments
 (0)