diff options
Diffstat (limited to 'src/iphone.c')
| -rw-r--r-- | src/iphone.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/iphone.c b/src/iphone.c index e4acea9..aa9687c 100644 --- a/src/iphone.c +++ b/src/iphone.c | |||
| @@ -171,10 +171,11 @@ int send_to_phone(iPhone *phone, char *data, int datalen) { | |||
| 171 | int recv_from_phone(iPhone *phone, char *data, int datalen) { | 171 | int recv_from_phone(iPhone *phone, char *data, int datalen) { |
| 172 | if (!phone) return -1; | 172 | if (!phone) return -1; |
| 173 | int bytes = 0; | 173 | int bytes = 0; |
| 174 | if (debug) printf("recv_from_phone(): attempting to receive %i bytes\n", datalen); | ||
| 174 | bytes = usb_bulk_read(phone->device, BULKIN, data, datalen, 3500); | 175 | bytes = usb_bulk_read(phone->device, BULKIN, data, datalen, 3500); |
| 175 | if(bytes < 0) | 176 | if(bytes < 0) |
| 176 | { | 177 | { |
| 177 | if(debug) printf("recv_from_iphone(): libusb gave me the error %d: %s (%s)\n", bytes, usb_strerror(), strerror(-bytes)); | 178 | if(debug) printf("recv_from_phone(): libusb gave me the error %d: %s (%s)\n", bytes, usb_strerror(), strerror(-bytes)); |
| 178 | return -1; | 179 | return -1; |
| 179 | } | 180 | } |
| 180 | return bytes; | 181 | return bytes; |
