diff options
| author | 2021-06-29 04:21:25 +0200 | |
|---|---|---|
| committer | 2021-06-29 04:21:25 +0200 | |
| commit | 8567650b1c2f44e2c53fb54b0e916ee3a0869add (patch) | |
| tree | c9bc011956a7f7019796996bb72cd5f99673301b /src/normal.c | |
| parent | b09706b48b00d00cfd61638d9e9b932484b29b79 (diff) | |
| download | idevicerestore-8567650b1c2f44e2c53fb54b0e916ee3a0869add.tar.gz idevicerestore-8567650b1c2f44e2c53fb54b0e916ee3a0869add.tar.bz2  | |
Make device mode specific code more consistent
Diffstat (limited to 'src/normal.c')
| -rw-r--r-- | src/normal.c | 7 | 
1 files changed, 4 insertions, 3 deletions
diff --git a/src/normal.c b/src/normal.c index 93ace67..301dbbe 100644 --- a/src/normal.c +++ b/src/normal.c @@ -138,7 +138,8 @@ static int normal_idevice_new(struct idevicerestore_client_t* client, idevice_t*  	return 0;  } -int normal_check_mode(struct idevicerestore_client_t* client) { +int normal_check_mode(struct idevicerestore_client_t* client) +{  	idevice_t device = NULL;  	normal_idevice_new(client, &device); @@ -260,7 +261,7 @@ int normal_enter_recovery(struct idevicerestore_client_t* client)  	mutex_lock(&client->device_event_mutex);  	debug("DEBUG: Waiting for device to disconnect...\n");  	cond_wait_timeout(&client->device_event_cond, &client->device_event_mutex, 60000); -	if (client->mode == &idevicerestore_modes[MODE_NORMAL] || (client->flags & FLAG_QUIT)) { +	if (client->mode == MODE_NORMAL || (client->flags & FLAG_QUIT)) {  		mutex_unlock(&client->device_event_mutex);  		error("ERROR: Failed to place device in recovery mode\n");  		return -1; @@ -268,7 +269,7 @@ int normal_enter_recovery(struct idevicerestore_client_t* client)  	debug("DEBUG: Waiting for device to connect in recovery mode...\n");  	cond_wait_timeout(&client->device_event_cond, &client->device_event_mutex, 60000); -	if (client->mode != &idevicerestore_modes[MODE_RECOVERY] || (client->flags & FLAG_QUIT)) { +	if (client->mode != MODE_RECOVERY || (client->flags & FLAG_QUIT)) {  		mutex_unlock(&client->device_event_mutex);  		error("ERROR: Failed to enter recovery mode\n");  		return -1;  | 
