From 22a2762622d455704424e419bd25341f3a38c18b Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Fri, 8 Feb 2013 18:14:56 -0500 Subject: [PATCH 1/7] client: Fix build break on Android --- client/cs_prefs.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/client/cs_prefs.cpp b/client/cs_prefs.cpp index 46066dfc7a..544a3e2246 100644 --- a/client/cs_prefs.cpp +++ b/client/cs_prefs.cpp @@ -33,6 +33,7 @@ #endif #endif +#include "common_defs.h" #include "filesys.h" #include "parse.h" #include "str_util.h" From ff0ab6aca606ae7c2180af5dddd184751ba90b1f Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Fri, 8 Feb 2013 18:23:20 -0500 Subject: [PATCH 2/7] WINSETUP: Update the custom actions that use the ENABLEPROTECTEDAPPLICATIONEXECUTION property --- .../redist/Windows/Win32/boinccas.dll | Bin 196608 -> 196608 bytes .../redist/Windows/Win32/boinccas95.dll | Bin 176128 -> 176128 bytes .../src/boinccas/CACreateBOINCAccounts.cpp | 2 +- .../src/boinccas/CACreateBOINCGroups.cpp | 2 +- .../src/boinccas/CACreateClientAuthFile.cpp | 2 +- .../redist/Windows/x64/boinccas.dll | Bin 279552 -> 279552 bytes .../redist/Windows/x64/boinccas95.dll | Bin 273920 -> 273920 bytes 7 files changed, 3 insertions(+), 3 deletions(-) diff --git a/win_build/installerv2/redist/Windows/Win32/boinccas.dll b/win_build/installerv2/redist/Windows/Win32/boinccas.dll index 207d632eb9d6293dbc19ff14a7fd2b53b421beb8..00cc32f68c6a408472200c2a55d81eb301948e40 100644 GIT binary patch delta 82 zcmZo@;Av>!S-{A=vR!mCGovrlkDTTp#`Yja#_2(fOou?i+r^of!S-{A=;F9oUW=3D8jZDo!jO{^;jMIY{nGS)3w~I3|$#XFpZ8zs(x*9DI i^nHH+eJwW61>9f5t4-Xiw##HNNvMMrn)frEEC2u~f*T$H diff --git a/win_build/installerv2/redist/Windows/Win32/boinccas95.dll b/win_build/installerv2/redist/Windows/Win32/boinccas95.dll index 6b601f91510439374d4950d53dbeb454fa463e2c..45d44aed70d3fc87d2d2f211936075848c4408ce 100644 GIT binary patch delta 70 zcmZp8z}4`8Yr+ra_3fe)fBP~?b~k%5ZueqjeDwe%wB7s>qpOR+!|q?bGR3SevspVN WW2b$cvAsu)X@)Xbfw~vd%~Sv*8XV;S delta 70 zcmZp8z}4`8Yr+raC6|OJ{`O^h)!OXExZR79@zn#6(021jjIJ&Mk+<(JcDn24Ff*jB XgYj6~&+R>GOf!_h3e>%rZl(eNfT$mO diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CACreateBOINCAccounts.cpp b/win_build/installerv2/redist/Windows/src/boinccas/CACreateBOINCAccounts.cpp index 73a9e2ed7e..af077f0b06 100644 --- a/win_build/installerv2/redist/Windows/src/boinccas/CACreateBOINCAccounts.cpp +++ b/win_build/installerv2/redist/Windows/src/boinccas/CACreateBOINCAccounts.cpp @@ -97,7 +97,7 @@ UINT CACreateBOINCAccounts::OnExecution() uiReturnValue = GetProperty( _T("MsiNTProductType"), strProductType ); if ( uiReturnValue ) return uiReturnValue; - uiReturnValue = GetProperty( _T("ENABLEPROTECTEDAPPLICATIONEXECUTION2"), strEnableProtectedApplicationExecution ); + uiReturnValue = GetProperty( _T("ENABLEPROTECTEDAPPLICATIONEXECUTION3"), strEnableProtectedApplicationExecution ); if ( uiReturnValue ) return uiReturnValue; diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CACreateBOINCGroups.cpp b/win_build/installerv2/redist/Windows/src/boinccas/CACreateBOINCGroups.cpp index 3db02a19be..88f2836d59 100644 --- a/win_build/installerv2/redist/Windows/src/boinccas/CACreateBOINCGroups.cpp +++ b/win_build/installerv2/redist/Windows/src/boinccas/CACreateBOINCGroups.cpp @@ -92,7 +92,7 @@ UINT CACreateBOINCGroups::OnExecution() uiReturnValue = GetProperty( _T("BOINC_PROJECT_USERNAME"), strBOINCProjectAccountUsername ); if ( uiReturnValue ) return uiReturnValue; - uiReturnValue = GetProperty( _T("ENABLEPROTECTEDAPPLICATIONEXECUTION2"), strEnableProtectedApplicationExecution ); + uiReturnValue = GetProperty( _T("ENABLEPROTECTEDAPPLICATIONEXECUTION3"), strEnableProtectedApplicationExecution ); if ( uiReturnValue ) return uiReturnValue; diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CACreateClientAuthFile.cpp b/win_build/installerv2/redist/Windows/src/boinccas/CACreateClientAuthFile.cpp index d0653e255e..35452e3b38 100644 --- a/win_build/installerv2/redist/Windows/src/boinccas/CACreateClientAuthFile.cpp +++ b/win_build/installerv2/redist/Windows/src/boinccas/CACreateClientAuthFile.cpp @@ -75,7 +75,7 @@ UINT CACreateClientAuthFile::OnExecution() uiReturnValue = GetProperty( _T("DATADIR"), strDataDirectory ); if ( uiReturnValue ) return uiReturnValue; - uiReturnValue = GetProperty( _T("ENABLEPROTECTEDAPPLICATIONEXECUTION2"), strEnableProtectedApplicationExecution ); + uiReturnValue = GetProperty( _T("ENABLEPROTECTEDAPPLICATIONEXECUTION3"), strEnableProtectedApplicationExecution ); if ( uiReturnValue ) return uiReturnValue; uiReturnValue = GetProperty( _T("BOINC_PROJECT_ISUSERNAME"), strBOINCProjectAccountUsername ); diff --git a/win_build/installerv2/redist/Windows/x64/boinccas.dll b/win_build/installerv2/redist/Windows/x64/boinccas.dll index 48076512efe906133d821d754f63646d493b077f..5a0f1c77c9aa807781cc3aebfbfbfc75db48128c 100644 GIT binary patch delta 83 zcmZqZ5NzlWobZAsYFzkQkh_BVSmwtF#xFw=G~MrJN{kks~Y4rbdZf$B!~b18xX b{!2@?Nc-^4p0j;P5_3WkSONQ0=ARJ&S=AfC delta 78 zcmZp;BhYY1V8RdPj!VK5fBQ1+nAYsY*zUy$!c5z}7@4`)K~mepIhbvu1m2b&k9U5& c%6)BSp3$4ix4*Y9Nn%bY0xMv@%KS3|0M8I0KmY&$ From d2df80a859a182727ad2f08eaf6f5d0abff1a412 Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Fri, 8 Feb 2013 18:36:01 -0500 Subject: [PATCH 3/7] client: Fix typos for Android --- client/cs_prefs.cpp | 4 ++-- lib/common_defs.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/client/cs_prefs.cpp b/client/cs_prefs.cpp index 544a3e2246..2a5e5ca214 100644 --- a/client/cs_prefs.cpp +++ b/client/cs_prefs.cpp @@ -291,11 +291,11 @@ int CLIENT_STATE::check_suspend_processing() { if (cp >= 0) { if (cp < 90) { hyst_state = true; - return SUSPEND_REASON_BATTERY_CHARGE; + return SUSPEND_REASON_BATTERY_CHARGING; } if (cp < 95) { if (hyst_state) { - return SUSPEND_REASON_BATTERY_CHARGE; + return SUSPEND_REASON_BATTERY_CHARGING; } } else { hyst_state = false; diff --git a/lib/common_defs.h b/lib/common_defs.h index 90474f7f16..c5bf00f844 100644 --- a/lib/common_defs.h +++ b/lib/common_defs.h @@ -118,7 +118,7 @@ enum BATTERY_STATE { BATTERY_STATE_DISCHARGING, BATTERY_STATE_CHARGING, BATTERY_STATE_FULL, - BATTERY_STATE_OVERHEAT + BATTERY_STATE_OVERHEATED }; // Values of RESULT::state in client. From 64ec0f49a37d29dd1b5bba7af3a734691ffcb01d Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Fri, 8 Feb 2013 18:46:03 -0500 Subject: [PATCH 4/7] client: Fix typos for Android --- client/hostinfo_network.cpp | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/client/hostinfo_network.cpp b/client/hostinfo_network.cpp index 0ff7e1d474..e043bc4c0c 100644 --- a/client/hostinfo_network.cpp +++ b/client/hostinfo_network.cpp @@ -64,19 +64,16 @@ // bool HOST_INFO::host_wifi_online() { char wifipath_pri[1024]; - snprintf(wifipath_pri, sizeof(wifipath_pri), char wifipath_sec[1024]; - snprintf(wifipath_sec, sizeof(wifipath_sec), - - FILE *f = fopen("/sys/class/net/eth0/operstate", "r"); - // location in Android 2.3 - if (!fsyswifi) { - fsyswifi = fopen("/sys/class/net/wlan0/operstate", "r"); - // location in Android 4 - } - char wifi_state[64]; + // location in Android 2.3 + FILE *f = fopen("/sys/class/net/eth0/operstate", "r"); + if (!f) { + // location in Android 4 + f = fopen("/sys/class/net/wlan0/operstate", "r"); + } + if (f) { fgets(wifi_state, 64, f); fclose(f); From 7b40d2286f4c5a8dd574729bb7c59c0d88db78f6 Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Fri, 8 Feb 2013 18:57:48 -0500 Subject: [PATCH 5/7] client: Fix Typo for Android --- client/hostinfo_network.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/hostinfo_network.cpp b/client/hostinfo_network.cpp index e043bc4c0c..af3dd7679a 100644 --- a/client/hostinfo_network.cpp +++ b/client/hostinfo_network.cpp @@ -82,7 +82,7 @@ bool HOST_INFO::host_wifi_online() { return false; } - if (strstr(wifi_state,"up"))) { + if (strstr(wifi_state,"up")) { return true; } return false; From c9717d068b927b1b1b7c4ad92e7266e320c27805 Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Fri, 8 Feb 2013 19:04:29 -0500 Subject: [PATCH 6/7] client: Fix typo for Android --- client/hostinfo_unix.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/hostinfo_unix.cpp b/client/hostinfo_unix.cpp index cba4d52463..df864a4a09 100644 --- a/client/hostinfo_unix.cpp +++ b/client/hostinfo_unix.cpp @@ -460,7 +460,7 @@ void HOST_INFO::get_battery_status() { snprintf(msg, sizeof(msg), "battery capacity at: %d%% charge", - capacity + battery_charge_pct ); LOGD(msg); @@ -484,7 +484,7 @@ void HOST_INFO::get_battery_status() { battery_state = BATTERY_STATE_UNKNOWN; if (strstr(health, "Overheat")) { LOGD("battery is overheating"); - battery_state = BATTERY_STATE_OVERHEAT; + battery_state = BATTERY_STATE_OVERHEATED; } else if (strstr(status, "Not charging")) { LOGD("battery is discharging"); battery_state = BATTERY_STATE_DISCHARGING; From 011441fb1f78f4e2c724780407ce4f07d2019398 Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Fri, 8 Feb 2013 19:13:28 -0500 Subject: [PATCH 7/7] client: Removed unused variables on Android wifi detection --- client/hostinfo_network.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/client/hostinfo_network.cpp b/client/hostinfo_network.cpp index af3dd7679a..8ad1e5b915 100644 --- a/client/hostinfo_network.cpp +++ b/client/hostinfo_network.cpp @@ -63,8 +63,6 @@ // if value cant be read, default return false // bool HOST_INFO::host_wifi_online() { - char wifipath_pri[1024]; - char wifipath_sec[1024]; char wifi_state[64]; // location in Android 2.3