summaryrefslogtreecommitdiffstats
path: root/cython/webinspector.pxi
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2021-02-01 11:32:28 +0100
committerGravatar Nikias Bassen2021-02-01 11:32:28 +0100
commitde1d724d0b753f21267da41eb4802e4f844f1331 (patch)
treedf43ed6436bd9d9615044ae46f19c5729e7e4fd0 /cython/webinspector.pxi
parent09f2332f7d4cd0cc8c4646a63d75a3f037e2b9b2 (diff)
downloadlibimobiledevice-de1d724d0b753f21267da41eb4802e4f844f1331.tar.gz
libimobiledevice-de1d724d0b753f21267da41eb4802e4f844f1331.tar.bz2
idevice: Allow partial reads in idevice_connection_receive_timeout() and handle timeouts more adequate
idevice_connection_receive_timeout(), when in SSL mode, was assuming it should always try to read the exact amount of data specified in `len` parameter. While this works with most protocols that have length fields or fixed sized headers/packets, some others (e.g. debugserver) break because it will request a read but doesn't know the size that is expected to be returned beforehand. This commit will handle timeouts better and return the number of bytes that were read in such cases (instead of returning 0 bytes read + error). Note that in the event of a timeout, IDEVICE_E_TIMEOUT will be returned even though actual data might have been read. The number of bytes read will be returned in recv_bytes.
Diffstat (limited to 'cython/webinspector.pxi')
0 files changed, 0 insertions, 0 deletions