Skip to content

Commit

Permalink
udp: fix ofp_send/ofp_sendto return value on success
Browse files Browse the repository at this point in the history
On UDP side, remaining bytes to process were not updated.
This commit fixes issue #250.

Signed-off-by: Bogdan Pricope <[email protected]>
Reviewed-by: Matias Elo <[email protected]>
  • Loading branch information
bogdanPricope authored and MatiasElo committed Jun 15, 2020
1 parent 8ffef20 commit 567efd5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/ofp_uipc_socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -1051,6 +1051,8 @@ ofp_sosend_dgram(struct socket *so, struct ofp_sockaddr *addr, struct uio *uio,
clen = 0;
control = ODP_PACKET_INVALID;
top = ODP_PACKET_INVALID;
if (!error && uio)
uio->uio_resid = resid;
out:
if (top != ODP_PACKET_INVALID)
odp_packet_free(top);
Expand Down

0 comments on commit 567efd5

Please sign in to comment.