From de25d71fba4e4bf08ec3f52ec66261cc139915e5 Mon Sep 17 00:00:00 2001 From: Dmytro Logachev Date: Tue, 20 Jun 2017 19:54:28 +0300 Subject: [PATCH] Bug fix after refactoring --- .../iot-manager-service/src/network/network_manager.cpp | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/control_app/iot-manager-service/src/network/network_manager.cpp b/control_app/iot-manager-service/src/network/network_manager.cpp index a8aeccf..c0d17c1 100644 --- a/control_app/iot-manager-service/src/network/network_manager.cpp +++ b/control_app/iot-manager-service/src/network/network_manager.cpp @@ -26,17 +26,7 @@ #define NM_GET_SESSION_STATE_FUNC_NAME "NM_GetSignInStatus" #define NM_SUBS_DEV_ST_CHNG_FUNC_NAME "NM_subscribeDeviceStateChanged" #define NM_UNSUBS_DEV_ST_CHNG_FUNC_NAME "NM_unsubscribeDeviceStateChanged" -#define NM_GET_OWNED_DEV_FUNC_NAME "NM_getOwnedDevices" -#define NM_FREE_DEV_LIST_FUNC_NAME "NM_freeDeviceList" -#define NM_GET_LIST_SIZE_FUNC_NAME "NM_getListSize" -#define NM_GET_UNOWNED_DEV_FUNC_NAME "NM_getUnownedDevices" -#define NM_RESET_DEV_LIST_FUNC_NAME "NM_resetDeviceList" -#define NM_DEV_LIST_ENUM_FUNC_NAME "NM_deviceListEnum" -#define NM_DEV_LIST_FOREACH_FUNC_NAME "NM_deviceListForEach" -#define NM_GET_DEV_INFO_FUNC_NAME "NM_getDeviceInfo" #define NM_FREE_DEV_INFO_FUNC_NAME "NM_freeDeviceInfo" -#define NM_OWN_DEV_FUNC_NAME "NM_ownDevice" -#define NM_UNOWN_DEV_FUNC_NAME "NM_unOwnDevice" #define NM_SUBS_NOTIFICATIONS_FUNC_NAME "NM_subscribeNotifications" #define NM_UNSUBS_NOTIF_FUNC_NAME "NM_unsubscribeNotifications" #define NM_GET_DEV_REPORT_FUNC_NAME "NM_getDeviceReport" @@ -45,6 +35,7 @@ #define NM_SET_DEV_POLICY_FUNC_NAME "NM_setDevicePolicy" #define NM_GET_DEV_AGENTS_FUNC_NAME "NM_getDeviceAgents" #define NM_GET_OWNED_DEV_UUIDS_FUNC_NAME "NM_getOwnedDevicesUUIDs" +#define NM_GET_UNOWNED_DEV_UUIDS_FUNC_NAME "NM_getUnownedDevicesUUIDs" #define NM_FREE_DEV_UUID_ARR_FUNC_NAME "NM_freeDeviceArray" #define NM_GET_DEV_INFO_BY_ID_FUNC_NAME "NM_getDeviceInfoEx" #define NM_OWN_DEV_BY_ID_FUNC_NAME "NM_ownDeviceEx" @@ -131,7 +122,7 @@ ErrorCode NetworkManager::ModuleSymbols::LoadModule() m_nmGetOwnedDeviceUUIDsFunc = reinterpret_cast( dlsym(this->m_module, NM_GET_OWNED_DEV_UUIDS_FUNC_NAME)); m_nmGetUnownedDeviceUUIDsFunc = reinterpret_cast( - dlsym(this->m_module, NM_GET_UNOWNED_DEV_FUNC_NAME)); + dlsym(this->m_module, NM_GET_UNOWNED_DEV_UUIDS_FUNC_NAME)); m_nmGetDeviceInfoByIdFunc = reinterpret_cast( dlsym(this->m_module, NM_GET_DEV_INFO_BY_ID_FUNC_NAME)); m_nmOwnDeviceByIdFunc = reinterpret_cast( @@ -421,7 +412,7 @@ DeviceList NetworkManager::ToDeviceList(char** uuids) return targetList; } - for (std::size_t i = 0; uuids[i]; ++uuids) + for (std::size_t i = 0; uuids[i]; ++i) { DevicePtr target = std::make_shared(); ErrorCode res; -- 2.7.4