diff options
| author | 2021-07-30 19:38:36 +0200 | |
|---|---|---|
| committer | 2021-07-30 19:38:36 +0200 | |
| commit | 537766a9032b7c1f952ccf4343e587a202ca1526 (patch) | |
| tree | a230ab62bd0ed4b481369b016d0699bfea4aa129 | |
| parent | 58f3516e9ff3f83f9c4b3f9f17181b5ce730f872 (diff) | |
| download | libimobiledevice-537766a9032b7c1f952ccf4343e587a202ca1526.tar.gz libimobiledevice-537766a9032b7c1f952ccf4343e587a202ca1526.tar.bz2 | |
idevice: Reset receive length variable in internal_ssl_read retry loop and fix wrong variable in debug message
| -rw-r--r-- | src/idevice.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/idevice.c b/src/idevice.c index 9d20709..869ecac 100644 --- a/src/idevice.c +++ b/src/idevice.c | |||
| @@ -864,6 +864,7 @@ static ssl_cb_ret_type_t internal_ssl_read(idevice_connection_t connection, char | |||
| 864 | 864 | ||
| 865 | /* repeat until we have the full data or an error occurs */ | 865 | /* repeat until we have the full data or an error occurs */ |
| 866 | do { | 866 | do { |
| 867 | bytes = 0; | ||
| 867 | if (timeout == (unsigned int)-1) { | 868 | if (timeout == (unsigned int)-1) { |
| 868 | res = internal_connection_receive(connection, buffer + pos, (uint32_t)length - pos, &bytes); | 869 | res = internal_connection_receive(connection, buffer + pos, (uint32_t)length - pos, &bytes); |
| 869 | } else { | 870 | } else { |
| @@ -885,7 +886,7 @@ static ssl_cb_ret_type_t internal_ssl_read(idevice_connection_t connection, char | |||
| 885 | } | 886 | } |
| 886 | } while (pos < (uint32_t)length); | 887 | } while (pos < (uint32_t)length); |
| 887 | 888 | ||
| 888 | debug_info("post-read received %i bytes", bytes); | 889 | debug_info("post-read received %i bytes", pos); |
| 889 | 890 | ||
| 890 | return pos; | 891 | return pos; |
| 891 | } | 892 | } |
