diff options
Diffstat (limited to 'src/recovery.c')
-rw-r--r-- | src/recovery.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/recovery.c b/src/recovery.c index 279fe50..41ed4fb 100644 --- a/src/recovery.c +++ b/src/recovery.c @@ -83,6 +83,16 @@ int recovery_client_new(struct idevicerestore_client_t* client) { debug("Retrying connection...\n"); } + if (client->srnm == NULL) { + char snbuf[256]; + snbuf[0] = '\0'; + irecv_get_srnm(recovery, snbuf); + if (snbuf[0] != '\0') { + client->srnm = strdup(snbuf); + info("INFO: device serial number is %s\n", client->srnm); + } + } + irecv_event_subscribe(recovery, IRECV_PROGRESS, &recovery_progress_callback, NULL); client->recovery->client = recovery; return 0; |