[host] service restarts now restart capture interfaces

This commit is contained in:
Geoffrey McRae 2017-12-30 13:35:19 +11:00
parent 9ef9f60505
commit 9b7f54fa35

View File

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