From c8b4787cb108ec1114f8c5a25d1ad6a1654164ef Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Thu, 30 Dec 2021 21:02:53 +1100 Subject: [PATCH] [client] don't report a spice error on graceful shutdown --- client/src/main.c | 18 +++++++++++------- repos/PureSpice | 2 +- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/client/src/main.c b/client/src/main.c index 93f85b95..0dc5e7e2 100644 --- a/client/src/main.c +++ b/client/src/main.c @@ -769,15 +769,15 @@ int main_frameThread(void * unused) int spiceThread(void * arg) { while(g_state.state != APP_STATE_SHUTDOWN) - if (!purespice_process(100)) + { + PSStatus status; + if ((status = purespice_process(100)) != PS_STATUS_RUN) { - if (g_state.state != APP_STATE_SHUTDOWN) - { - g_state.state = APP_STATE_SHUTDOWN; + if (status != PS_STATUS_SHUTDOWN) DEBUG_ERROR("failed to process spice messages"); - } break; } + } if (g_state.audioDev) { @@ -1041,12 +1041,16 @@ static int lg_run(void) } while(g_state.state != APP_STATE_SHUTDOWN && !purespice_ready()) - if (!purespice_process(1000)) + { + PSStatus status; + if ((status = purespice_process(1000)) != PS_STATUS_RUN) { g_state.state = APP_STATE_SHUTDOWN; - DEBUG_ERROR("Failed to process spice messages"); + if (status != PS_STATUS_SHUTDOWN) + DEBUG_ERROR("Failed to process spice messages"); return -1; } + } purespice_mouseMode(true); if (!lgCreateThread("spiceThread", spiceThread, NULL, &t_spice)) diff --git a/repos/PureSpice b/repos/PureSpice index a9664f73..d1f86f73 160000 --- a/repos/PureSpice +++ b/repos/PureSpice @@ -1 +1 @@ -Subproject commit a9664f731ab720ff890c35225f271048addfd54d +Subproject commit d1f86f739974851afc5f98e13ea74ba6c96f805b