mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-08-21 22:51:31 +00:00
[client] spice: terminate fallback after MAIN loss
Some checks are pending
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Waiting to run
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Waiting to run
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Waiting to run
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Waiting to run
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Waiting to run
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Waiting to run
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Waiting to run
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Waiting to run
build / module (push) Waiting to run
build / host-linux (push) Waiting to run
build / host-windows-cross (push) Waiting to run
build / host-windows-native (push) Waiting to run
build / idd (push) Waiting to run
build / obs (clang) (push) Waiting to run
build / obs (gcc) (push) Waiting to run
build / docs (push) Waiting to run
Some checks are pending
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Waiting to run
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Waiting to run
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Waiting to run
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Waiting to run
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Waiting to run
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Waiting to run
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Waiting to run
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Waiting to run
build / module (push) Waiting to run
build / host-linux (push) Waiting to run
build / host-windows-cross (push) Waiting to run
build / host-windows-native (push) Waiting to run
build / idd (push) Waiting to run
build / obs (clang) (push) Waiting to run
build / obs (gcc) (push) Waiting to run
build / docs (push) Waiting to run
Treat a missing SPICE MAIN channel as terminal in PureSpice. Check fallback session health before activation and publication.
This commit is contained in:
@@ -460,6 +460,14 @@ static LG_TransportStatus connectFallback(LG_TransportFallback * fallback,
|
||||
lgWaitEvent(fallback->wakeEvent, SESSION_POLL_MS);
|
||||
if (atomic_load_explicit(&fallback->stop, memory_order_acquire))
|
||||
break;
|
||||
|
||||
if (!sessionLive(fallback))
|
||||
{
|
||||
lost = !atomic_load_explicit(
|
||||
&fallback->stop, memory_order_acquire);
|
||||
break;
|
||||
}
|
||||
|
||||
applyVideoRequest(fallback);
|
||||
|
||||
LG_LOCK_EXCLUSIVE(fallback->lock);
|
||||
@@ -695,12 +703,14 @@ static bool applyVideoRequest(LG_TransportFallback * fallback)
|
||||
};
|
||||
const bool result = lgSwSurface_setActive(surfaceOps, transport,
|
||||
requested, videoCallCancelled, (void *)&cancellation);
|
||||
const bool live = sessionLive(fallback);
|
||||
|
||||
LG_LOCK_EXCLUSIVE(fallback->lock);
|
||||
const bool current = fallback->connectionSerial == connectionSerial;
|
||||
const bool current = fallback->connectionSerial ==
|
||||
connectionSerial;
|
||||
const bool desiredCurrent = current &&
|
||||
fallback->videoRequested == requested;
|
||||
const bool usable = desiredCurrent && result &&
|
||||
const bool usable = desiredCurrent && result && live &&
|
||||
atomic_load_explicit(&fallback->usable, memory_order_acquire) &&
|
||||
!atomic_load_explicit(&fallback->stop, memory_order_acquire) &&
|
||||
!fallback->closing && endpointMatchesLocked(fallback);
|
||||
@@ -717,7 +727,7 @@ static bool applyVideoRequest(LG_TransportFallback * fallback)
|
||||
ready, memory_order_release);
|
||||
}
|
||||
const bool accepted = usable;
|
||||
const bool retry = current && !fallback->closing &&
|
||||
const bool retry = current && !fallback->closing &&
|
||||
fallback->videoRequested != requested;
|
||||
LG_UNLOCK_EXCLUSIVE(fallback->lock);
|
||||
|
||||
|
||||
Submodule repos/PureSpice updated: 4e8583a437...a077e3f477
Reference in New Issue
Block a user