From 60c0114e846a593895503a78d13b006f93e95675 Mon Sep 17 00:00:00 2001 From: Andre Hartmann Date: Wed, 25 Oct 2017 12:58:09 +0200 Subject: SystecCAN: Fix availableDevices() for more than one device initInfo->m_fTryNext is set to false when the callback is entered but must be set to true to continue with the next device. [ChangeLog][QCanBus][SystecCAN] Fixed that the function availableDevices() only returned the first device. Change-Id: I689564c2379a1db28cb7c623425aa261e44fdd4d Reviewed-by: Denis Shienkov Reviewed-by: Alex Blasche --- src/plugins/canbus/systeccan/systeccanbackend.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/canbus/systeccan/systeccanbackend.cpp b/src/plugins/canbus/systeccan/systeccanbackend.cpp index ca63e86..2662c42 100644 --- a/src/plugins/canbus/systeccan/systeccanbackend.cpp +++ b/src/plugins/canbus/systeccan/systeccanbackend.cpp @@ -69,11 +69,12 @@ static void DRV_CALLBACK_TYPE ucanEnumCallback(DWORD index, BOOL isUsed, Q_UNUSED(index); Q_UNUSED(isUsed); - Q_UNUSED(initInfo); result->append(QString::fromLatin1("can%1.0").arg(hardwareInfo->m_bDeviceNr)); if (USBCAN_CHECK_SUPPORT_TWO_CHANNEL(hardwareInfo)) result->append(QString::fromLatin1("can%1.1").arg(hardwareInfo->m_bDeviceNr)); + + initInfo->m_fTryNext = true; // continue enumerating with next device } QList SystecCanBackend::interfaces() -- cgit v1.2.3