From 9b7f54fa358e2a2fabfcc7a5c493ba91b9088b58 Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Sat, 30 Dec 2017 13:35:19 +1100 Subject: [PATCH] [host] service restarts now restart capture interfaces --- host/Service.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/host/Service.cpp b/host/Service.cpp index 375a1a48..517b5df6 100644 --- a/host/Service.cpp +++ b/host/Service.cpp @@ -183,6 +183,19 @@ bool Service::Process() // check if the client has flagged a restart if (f & KVMFR_HEADER_FLAG_RESTART) { + DEBUG_INFO("Restart Requested"); + if (!m_capture->ReInitialize()) + { + DEBUG_ERROR("ReInitialize Failed"); + return false; + } + + if (m_capture->GetMaxFrameSize() > m_frameSize) + { + DEBUG_ERROR("Maximum frame size of %zd bytes excceds maximum space available", m_capture->GetMaxFrameSize()); + return false; + } + INTERLOCKED_AND8((volatile char *)flags, ~(KVMFR_HEADER_FLAG_RESTART)); break; }