diff --git a/disable_idle_time_detection.patch b/disable_idle_time_detection.patch index 847e470..b17f997 100644 --- a/disable_idle_time_detection.patch +++ b/disable_idle_time_detection.patch @@ -1,7 +1,7 @@ -diff -urNr boinc-client_release-7.16-7.16.11-orig/client/client_state.cpp boinc-client_release-7.16-7.16.11/client/client_state.cpp ---- boinc-client_release-7.16-7.16.11-orig/client/client_state.cpp 2020-08-30 10:04:59.000000000 +0200 -+++ boinc-client_release-7.16-7.16.11/client/client_state.cpp 2020-10-30 12:39:28.363185257 +0100 -@@ -1003,7 +1003,8 @@ +diff -urNr boinc-client_release-7.18-7.18.1-orig/client/client_state.cpp boinc-client_release-7.18-7.18.1/client/client_state.cpp +--- boinc-client_release-7.18-7.18.1-orig/client/client_state.cpp 2021-08-03 17:52:19.000000000 +0200 ++++ boinc-client_release-7.18-7.18.1/client/client_state.cpp 2022-06-10 01:23:09.017033524 +0200 +@@ -988,7 +988,8 @@ user_active = device_status.user_active; #else long idle_time = host_info.user_idle_time(check_all_logins); @@ -11,11 +11,11 @@ diff -urNr boinc-client_release-7.16-7.16.11-orig/client/client_state.cpp boinc- #endif if (user_active != old_user_active) { -diff -urNr boinc-client_release-7.16-7.16.11-orig/client/hostinfo_unix.cpp boinc-client_release-7.16-7.16.11/client/hostinfo_unix.cpp ---- boinc-client_release-7.16-7.16.11-orig/client/hostinfo_unix.cpp 2020-08-30 10:04:59.000000000 +0200 -+++ boinc-client_release-7.16-7.16.11/client/hostinfo_unix.cpp 2020-10-30 12:50:06.251852694 +0100 -@@ -41,16 +41,6 @@ - #include +diff -urNr boinc-client_release-7.18-7.18.1-orig/client/hostinfo_unix.cpp boinc-client_release-7.18-7.18.1/client/hostinfo_unix.cpp +--- boinc-client_release-7.18-7.18.1-orig/client/hostinfo_unix.cpp 2021-08-03 17:52:19.000000000 +0200 ++++ boinc-client_release-7.18-7.18.1/client/hostinfo_unix.cpp 2022-06-10 01:31:25.613324653 +0200 +@@ -45,15 +45,6 @@ + #include #endif -#if HAVE_XSS @@ -27,11 +27,10 @@ diff -urNr boinc-client_release-7.16-7.16.11-orig/client/hostinfo_unix.cpp boinc - // (There is a DirScanner class in BOINC, but it doesn't do what we want) -#include "log_flags.h" // idle_detection_debug flag for verbose output -#endif -- + #include #include - #include -@@ -1555,11 +1545,7 @@ +@@ -1677,11 +1668,7 @@ } inline long device_idle_time(const char *device) { @@ -44,28 +43,31 @@ diff -urNr boinc-client_release-7.16-7.16.11-orig/client/hostinfo_unix.cpp boinc } // list of directories and prefixes of TTY devices -@@ -1618,19 +1604,7 @@ +@@ -1754,22 +1741,7 @@ } inline long all_tty_idle_time() { - static vector tty_list; +- static bool first = true; - struct stat sbuf; -- unsigned int i; - long idle_time = USER_IDLE_TIME_INF; - -- if (tty_list.size()==0) tty_list=get_tty_list(); -- for (i=0; i (120)) { // If system has been up for more than 2 minutes -- msg_printf(NULL, MSG_INFO, +- msg_printf(NULL, MSG_INFO, - "Could not connect to HIDSystem: user idle detection is disabled." - ); - error_posted = true; @@ -98,8 +100,9 @@ diff -urNr boinc-client_release-7.16-7.16.11-orig/client/hostinfo_unix.cpp boinc - } - - if (!gstate.executing_as_daemon) { -- idleTimeFromCG = CGEventSourceSecondsSinceLastEventType -- (kCGEventSourceStateCombinedSessionState, kCGAnyInputEventType); +- idleTimeFromCG = CGEventSourceSecondsSinceLastEventType ( +- kCGEventSourceStateCombinedSessionState, kCGAnyInputEventType +- ); - - if (idleTimeFromCG < idleTime) { - idleTime = idleTimeFromCG; @@ -109,7 +112,7 @@ diff -urNr boinc-client_release-7.16-7.16.11-orig/client/hostinfo_unix.cpp boinc return (long)idleTime; } -@@ -1732,18 +1670,8 @@ +@@ -1873,18 +1808,8 @@ #if HAVE_UTMP_H inline long user_idle_time(struct utmp* u) { @@ -130,7 +133,7 @@ diff -urNr boinc-client_release-7.16-7.16.11-orig/client/hostinfo_unix.cpp boinc } #if !HAVE_SETUTENT || !HAVE_GETUTENT -@@ -1787,202 +1715,28 @@ +@@ -1928,202 +1853,28 @@ inline long all_logins_idle() { struct utmp* u; setutent();