diff options
Diffstat (limited to 'src/ideviceinstaller.c')
| -rw-r--r-- | src/ideviceinstaller.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/ideviceinstaller.c b/src/ideviceinstaller.c index ec4f767..1fc79bb 100644 --- a/src/ideviceinstaller.c +++ b/src/ideviceinstaller.c | |||
| @@ -244,7 +244,6 @@ static void idevice_event_callback(const idevice_event_t* event, void* userdata) | |||
| 244 | 244 | ||
| 245 | static void idevice_wait_for_operation_to_complete() | 245 | static void idevice_wait_for_operation_to_complete() |
| 246 | { | 246 | { |
| 247 | int i = 0; | ||
| 248 | struct timespec ts; | 247 | struct timespec ts; |
| 249 | ts.tv_sec = 0; | 248 | ts.tv_sec = 0; |
| 250 | ts.tv_nsec = 500000000; | 249 | ts.tv_nsec = 500000000; |
| @@ -255,15 +254,13 @@ static void idevice_wait_for_operation_to_complete() | |||
| 255 | 254 | ||
| 256 | /* wait for operation to complete */ | 255 | /* wait for operation to complete */ |
| 257 | while (wait_for_op_complete && !op_completed && !err_occured | 256 | while (wait_for_op_complete && !op_completed && !err_occured |
| 258 | && !notified && (i < 60) && is_device_connected) { | 257 | && !notified && is_device_connected) { |
| 259 | nanosleep(&ts, NULL); | 258 | nanosleep(&ts, NULL); |
| 260 | i++; | ||
| 261 | } | 259 | } |
| 262 | 260 | ||
| 263 | /* wait some time if a notification is expected */ | 261 | /* wait some time if a notification is expected */ |
| 264 | while (notification_expected && !notified && !err_occured && (i < 10) && is_device_connected) { | 262 | while (notification_expected && !notified && !err_occured && is_device_connected) { |
| 265 | nanosleep(&ts, NULL); | 263 | nanosleep(&ts, NULL); |
| 266 | i++; | ||
| 267 | } | 264 | } |
| 268 | 265 | ||
| 269 | idevice_event_unsubscribe(); | 266 | idevice_event_unsubscribe(); |
