]> git.ipfire.org Git - thirdparty/qemu.git/commit
curl: Check completion in curl_multi_do()
authorMax Reitz <mreitz@redhat.com>
Tue, 10 Sep 2019 12:41:32 +0000 (14:41 +0200)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 1 Oct 2019 21:58:28 +0000 (16:58 -0500)
commit2aba40a2c8813533ebc4af02d181745e4ae96142
treed45754b2d524a55fe367123cd60e0b5c1b7e0ecc
parent06b178eb6168dd5d3a50b7dc210cac748c1f19a1
curl: Check completion in curl_multi_do()

While it is more likely that transfers complete after some file
descriptor has data ready to read, we probably should not rely on it.
Better be safe than sorry and call curl_multi_check_completion() in
curl_multi_do(), too, just like it is done in curl_multi_read().

With this change, curl_multi_do() and curl_multi_read() are actually the
same, so drop curl_multi_read() and use curl_multi_do() as the sole FD
handler.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Message-id: 20190910124136.10565-4-mreitz@redhat.com
Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
(cherry picked from commit 948403bcb1c7e71dcbe8ab8479cf3934a0efcbb5)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
block/curl.c