[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
This commit is contained in:
Geoffrey McRae 2021-01-05 09:13:54 +11:00
parent a172d79f66
commit 12c83e82bb

View file

@ -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);