]> git.ipfire.org Git - thirdparty/samba.git/commit
lib/tsocket: optimize tdgram_recvfrom_done() into tdgram_recvfrom_send()
authorStefan Metzmacher <metze@samba.org>
Fri, 16 May 2025 14:29:19 +0000 (16:29 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 17 Jul 2025 08:59:37 +0000 (08:59 +0000)
commita8c208053306aa26c0faf1713bfcbc49d2825eda
treee0893c105da6379a21f65888118ff922e74331d7
parent354b534fe03ae7e3f01b63da7dc5ee14220efa46
lib/tsocket: optimize tdgram_recvfrom_done() into tdgram_recvfrom_send()

For callers using tdgram_bsd_optimize_recvfrom() it is every useful
to know it data was already waiting in the socket.

In that case the result from tdgram_bsd_recvfrom_send() would
already report tevent_req_is_in_progress() as false.

But the result of tdgram_recvfrom_send() available to the
caller would see tevent_req_is_in_progress() reporting true.

With this change also the result of tdgram_recvfrom_send()
would report tevent_req_is_in_progress() as false,
which will be useful for callers, which would otherwise
set a timeout on the request.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
lib/tsocket/tsocket.c