]> xenbits.xensource.com Git - pvdrivers/win/xeniface.git/commitdiff
Only add device if the guid matches
authorPaul Durrant <paul.durrant@citrix.com>
Wed, 29 Mar 2017 14:48:35 +0000 (15:48 +0100)
committerPaul Durrant <paul.durrant@citrix.com>
Mon, 3 Apr 2017 16:52:32 +0000 (17:52 +0100)
The IDeviceCreator::OnDeviceAdded() method should only be called for
devices matching the GUID specified to the CDeviceList object creator.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
src/xenagent/devicelist.cpp

index 98caffb52171b93f7f277e6eacd2aa3701435a0b..2c110bc6277ca95178f9425b4e462335ad4613a5 100644 (file)
@@ -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;