From 12c83e82bb164f892872cee433f6e8d8480a086d Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Tue, 5 Jan 2021 09:13:54 +1100 Subject: [PATCH] [client] if the host version doesn't match wait for it to be upgraded This change allows one to upgrade the host application using the LG spice client instead of immediately terminating --- client/src/main.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/client/src/main.c b/client/src/main.c index ff493602..27e73ba3 100644 --- a/client/src/main.c +++ b/client/src/main.c @@ -1913,7 +1913,20 @@ restart: DEBUG_ERROR("Invalid KVMFR magic"); DEBUG_BREAK(); - return -1; + + if (magicMatches) + { + DEBUG_INFO("Waiting for you to upgrade the host application"); + while (g_state.state == APP_STATE_RUNNING && udata->version != KVMFR_VERSION) + SDL_WaitEventTimeout(NULL, 1000); + + if (g_state.state != APP_STATE_RUNNING) + return -1; + + goto restart; + } + else + return -1; } DEBUG_INFO("Host ready, reported version: %s", udata->hostver);