From: Paul Durrant Date: Wed, 29 Mar 2017 14:48:35 +0000 (+0100) Subject: Only add device if the guid matches X-Git-Tag: 9.0.0-rc1~35 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=7defd1433b0ccc12b95867652aba05b67d773fc6;p=pvdrivers%2Fwin%2Fxeniface.git Only add device if the guid matches The IDeviceCreator::OnDeviceAdded() method should only be called for devices matching the GUID specified to the CDeviceList object creator. Signed-off-by: Paul Durrant --- diff --git a/src/xenagent/devicelist.cpp b/src/xenagent/devicelist.cpp index 98caffb..2c110bc 100644 --- a/src/xenagent/devicelist.cpp +++ b/src/xenagent/devicelist.cpp @@ -218,7 +218,8 @@ void CDeviceList::OnDeviceEvent(DWORD evt, LPVOID data) case DBT_DEVICEARRIVAL: if (hdr->dbch_devicetype == DBT_DEVTYP_DEVICEINTERFACE) { itf = (PDEV_BROADCAST_DEVICEINTERFACE)hdr; - OnDeviceAdded(Convert((const wchar_t*)itf->dbcc_name)); + if (itf->dbcc_classguid == m_guid) + OnDeviceAdded(Convert((const wchar_t*)itf->dbcc_name)); } break;