summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2019-10-04 00:50:43 +0200
committerGravatar Nikias Bassen2019-10-04 00:50:43 +0200
commit3135461d44c725312bd53a4ec2c72246980c8773 (patch)
tree018f19e8689b4baa69cc18a10ca3957cd968b40d /src
parent9181cd5eed8c5046133d2f2fe9cee59e52a30ccf (diff)
downloadidevicerestore-3135461d44c725312bd53a4ec2c72246980c8773.tar.gz
idevicerestore-3135461d44c725312bd53a4ec2c72246980c8773.tar.bz2
Select first discovered recovery/dfu device if no ECID is given
Diffstat (limited to 'src')
-rw-r--r--src/idevicerestore.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/idevicerestore.c b/src/idevicerestore.c
index 42f257a..f354b12 100644
--- a/src/idevicerestore.c
+++ b/src/idevicerestore.c
@@ -227,6 +227,9 @@ static void irecv_event_cb(const irecv_device_event_t* event, void *userdata)
{
struct idevicerestore_client_t *client = (struct idevicerestore_client_t*)userdata;
if (event->type == IRECV_DEVICE_ADD) {
+ if (!client->udid && !client->ecid) {
+ client->ecid = event->device_info->ecid;
+ }
if (client->ecid && event->device_info->ecid == client->ecid) {
switch (event->mode) {
case IRECV_K_WTF_MODE: