diff options
| author | 2009-05-10 08:27:53 -0700 | |
|---|---|---|
| committer | 2009-05-10 08:28:04 -0700 | |
| commit | 1351b686d450112ae55d26d81d9d59c5f542f12e (patch) | |
| tree | 442c7e48eb83f96a22f7c6d889e8fe26151d6cba /src/iphone.c | |
| parent | e91caeb1c9929f9dc8af747bb3a2e52ec06b03af (diff) | |
| download | libimobiledevice-1351b686d450112ae55d26d81d9d59c5f542f12e.tar.gz libimobiledevice-1351b686d450112ae55d26d81d9d59c5f542f12e.tar.bz2 | |
NotificationProxy support added.0.9.0
[#27 state:resolved]
Signed-off-by: Matt Colyer <matt@colyer.name>
Diffstat (limited to 'src/iphone.c')
| -rw-r--r-- | src/iphone.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/iphone.c b/src/iphone.c index 3c3034e..9dd3c07 100644 --- a/src/iphone.c +++ b/src/iphone.c | |||
| @@ -288,10 +288,11 @@ int send_to_phone(iphone_device_t phone, char *data, int datalen) | |||
| 288 | * @param phone The iPhone to receive data from | 288 | * @param phone The iPhone to receive data from |
| 289 | * @param data Where to put data read | 289 | * @param data Where to put data read |
| 290 | * @param datalen How much data to read in | 290 | * @param datalen How much data to read in |
| 291 | * @param timeout How many milliseconds to wait for data | ||
| 291 | * | 292 | * |
| 292 | * @return How many bytes were read in, or -1 on error. | 293 | * @return How many bytes were read in, or -1 on error. |
| 293 | */ | 294 | */ |
| 294 | int recv_from_phone(iphone_device_t phone, char *data, int datalen) | 295 | int recv_from_phone(iphone_device_t phone, char *data, int datalen, int timeout) |
| 295 | { | 296 | { |
| 296 | if (!phone) | 297 | if (!phone) |
| 297 | return -1; | 298 | return -1; |
| @@ -301,7 +302,7 @@ int recv_from_phone(iphone_device_t phone, char *data, int datalen) | |||
| 301 | return -1; | 302 | return -1; |
| 302 | log_debug_msg("recv_from_phone(): attempting to receive %i bytes\n", datalen); | 303 | log_debug_msg("recv_from_phone(): attempting to receive %i bytes\n", datalen); |
| 303 | 304 | ||
| 304 | bytes = usb_bulk_read(phone->device, BULKIN, data, datalen, 3500); | 305 | bytes = usb_bulk_read(phone->device, BULKIN, data, datalen, timeout); |
| 305 | if (bytes < 0) { | 306 | if (bytes < 0) { |
| 306 | log_debug_msg("recv_from_phone(): libusb gave me the error %d: %s (%s)\n", bytes, usb_strerror(), | 307 | log_debug_msg("recv_from_phone(): libusb gave me the error %d: %s (%s)\n", bytes, usb_strerror(), |
| 307 | strerror(-bytes)); | 308 | strerror(-bytes)); |
