From 17044d38bda774f5b5ca3d2a25ffec8dda22040d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adolfo=20G=C3=B3mez=20Garc=C3=ADa?= Date: Mon, 3 Oct 2016 14:23:19 +0200 Subject: [PATCH] Improvement on ready setting logged in counter to 0 --- server/src/uds/core/osmanagers/BaseOsManager.py | 5 +++++ server/src/uds/osmanagers/LinuxOsManager/LinuxOsManager.py | 1 + .../src/uds/osmanagers/WindowsOsManager/WindowsOsManager.py | 1 + 3 files changed, 7 insertions(+) diff --git a/server/src/uds/core/osmanagers/BaseOsManager.py b/server/src/uds/core/osmanagers/BaseOsManager.py index 96b9373b1..e47e527f4 100644 --- a/server/src/uds/core/osmanagers/BaseOsManager.py +++ b/server/src/uds/core/osmanagers/BaseOsManager.py @@ -177,6 +177,11 @@ class OSManager(Module): def logKnownIp(self, userService, ip): userService.logIP(ip) + + def toReady(self, userService): + userService.setProperty('loginsCounter', '0') + + def loggedIn(self, userService, userName=None, save=True): ''' This method: diff --git a/server/src/uds/osmanagers/LinuxOsManager/LinuxOsManager.py b/server/src/uds/osmanagers/LinuxOsManager/LinuxOsManager.py index 93962f4c1..e527d610b 100644 --- a/server/src/uds/osmanagers/LinuxOsManager/LinuxOsManager.py +++ b/server/src/uds/osmanagers/LinuxOsManager/LinuxOsManager.py @@ -171,6 +171,7 @@ class LinuxOsManager(osmanagers.OSManager): state = State.USABLE self.notifyIp(userService.unique_id, userService, data) elif msg == "ready": + self.toReady(userService) state = State.USABLE notifyReady = True self.notifyIp(userService.unique_id, userService, data) diff --git a/server/src/uds/osmanagers/WindowsOsManager/WindowsOsManager.py b/server/src/uds/osmanagers/WindowsOsManager/WindowsOsManager.py index 18ba3d771..a162512fc 100644 --- a/server/src/uds/osmanagers/WindowsOsManager/WindowsOsManager.py +++ b/server/src/uds/osmanagers/WindowsOsManager/WindowsOsManager.py @@ -181,6 +181,7 @@ class WindowsOsManager(osmanagers.OSManager): state = State.USABLE self.notifyIp(userService.unique_id, userService, data) elif msg == "ready": + self.toReady(userService) state = State.USABLE notifyReady = True self.notifyIp(userService.unique_id, userService, data)