From 1fc16f95728595d8033cb0d9f5724e146a523fa9 Mon Sep 17 00:00:00 2001 From: Pahansith Gunathilake Date: Tue, 28 May 2019 05:18:05 +0000 Subject: [PATCH] Fix windows device inactive after sync --- .../device/mgt/core/operation/mgt/OperationManagerImpl.java | 2 +- .../mgt/core/service/DeviceManagementProviderServiceImpl.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/OperationManagerImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/OperationManagerImpl.java index d2fb72b90e6..3a9db4f4c0d 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/OperationManagerImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/OperationManagerImpl.java @@ -1132,7 +1132,7 @@ public class OperationManagerImpl implements OperationManager { DeviceManagementDAOFactory.beginTransaction(); int tenantId = CarbonContext.getThreadLocalCarbonContext().getTenantId(); String user = this.getUser(); - updateStatus = enrollmentDAO.setStatus(enrolmentId, user, status, tenantId); + updateStatus = enrollmentDAO.setStatus(enrolmentId, status, tenantId); DeviceManagementDAOFactory.commitTransaction(); } catch (DeviceManagementDAOException e) { DeviceManagementDAOFactory.rollbackTransaction(); diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java index a890487f4ca..b65b75d2ea1 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java @@ -1423,7 +1423,7 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv EnrolmentInfo enrolmentInfo = device.getEnrolmentInfo(); DeviceManagementDAOFactory.beginTransaction(); if (enrolmentInfo != null) { - success = enrollmentDAO.setStatus(enrolmentInfo.getId(), currentOwner, status, tenantId); + success = enrollmentDAO.setStatus(enrolmentInfo.getId(), status, tenantId); } DeviceManagementDAOFactory.commitTransaction(); this.removeDeviceFromCache(deviceId);