From 914ddc3e93795b65eb98f1eac47d053d9909ba1a Mon Sep 17 00:00:00 2001 From: Kevin Trocolli Date: Thu, 19 Jan 2023 14:25:29 -0500 Subject: [PATCH] iauth: Fix hanging on reinitialization --- amcus/iauth.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/amcus/iauth.c b/amcus/iauth.c index c89aff7..b598034 100644 --- a/amcus/iauth.c +++ b/amcus/iauth.c @@ -37,13 +37,13 @@ static HRESULT STDMETHODCALLTYPE IAuth_QueryInterface(IAuth FAR *This, REFIID ri static ULONG STDMETHODCALLTYPE IAuth_AddRef(IAuth FAR *This) { - dprintf("IAuth: AddRef\n"); + // dprintf("IAuth: AddRef\n"); return ++REF_COUNT; } static ULONG STDMETHODCALLTYPE IAuth_Release(IAuth FAR *This) { - dprintf("IAuth: Release\n"); + // dprintf("IAuth: Release\n"); return --REF_COUNT; } @@ -137,10 +137,11 @@ static HRESULT STDMETHODCALLTYPE IAuth_GetUpdaterState(IAuth FAR *This, struct a arr->amauth_init_state = amauthd_state; arr->MemberC4 = 0; - if (amauthd_state == 5) { - amauthd_state = 6; - } else if (amauthd_state == 6) { - amauthd_state = 9; + switch (amauthd_state) { + case 5: amauthd_state = 6; break; + case 6: amauthd_state = 15; break; + case 15: amauthd_state = 9; break; + default: break; } return S_OK; @@ -367,7 +368,6 @@ static HRESULT STDMETHODCALLTYPE IAuth_Func23(IAuth FAR *This, int64_t p0) static HRESULT STDMETHODCALLTYPE IAuth_Func24(IAuth FAR *This) { dprintf("IAuth: %s hit!\n", __func__); - return S_OK; }