[boinc] 01/03: Imported Upstream version 7.4.30+dfsg
Gianfranco Costamagna
locutusofborg-guest at moszumanska.debian.org
Tue Nov 25 17:34:59 UTC 2014
This is an automated email from the git hooks/post-receive script.
locutusofborg-guest pushed a commit to branch experimental
in repository boinc.
commit 9d41ca0cddb71fb5d53d8888b92343289fef8dc7
Author: Gianfranco Costamagna <costamagnagianfranco at yahoo.it>
Date: Tue Nov 25 18:33:46 2014 +0100
Imported Upstream version 7.4.30+dfsg
---
android/BOINC/AndroidManifest.xml | 12 ++--
.../src/edu/berkeley/boinc/client/Monitor.java | 5 +-
.../src/edu/berkeley/boinc/rpc/RpcClient.java | 14 +++-
android/build_boinc_arm.sh | 6 +-
android/build_boinc_mips.sh | 6 +-
android/build_boinc_x86.sh | 6 +-
android/build_curl_arm.sh | 6 +-
android/build_curl_mips.sh | 6 +-
android/build_curl_x86.sh | 6 +-
android/build_libraries_arm.sh | 6 +-
android/build_libraries_mips.sh | 6 +-
android/build_libraries_x86.sh | 6 +-
android/build_openssl_arm.sh | 6 +-
android/build_openssl_mips.sh | 6 +-
android/build_openssl_x86.sh | 6 +-
client/acct_setup.cpp | 18 ++---
client/acct_setup.h | 1 +
client/app.cpp | 2 +-
client/app_config.cpp | 83 ++++++++++++++--------
client/app_config.h | 1 +
client/client_msgs.cpp | 6 +-
client/client_state.cpp | 9 +--
client/client_types.h | 2 +-
client/cpu_sched.cpp | 16 +++--
client/cs_prefs.cpp | 5 +-
client/cs_scheduler.cpp | 15 ++--
client/cs_statefile.cpp | 7 ++
client/gui_rpc_server_ops.cpp | 19 ++++-
client/result.cpp | 7 +-
client/result.h | 3 +
client/rr_sim.cpp | 4 +-
client/sim.cpp | 9 +--
client/sysmon_win.cpp | 4 +-
client/work_fetch.cpp | 35 ++++++---
client/work_fetch.h | 3 +-
clientgui/ProjectProcessingPage.cpp | 1 +
clientgui/browser.cpp | 8 +--
configure.ac | 2 +-
lib/app_ipc.cpp | 12 +++-
lib/coproc.h | 5 ++
lib/crypt.cpp | 30 ++++++--
lib/error_numbers.h | 1 +
lib/gui_rpc_client.cpp | 4 +-
lib/gui_rpc_client.h | 1 +
lib/gui_rpc_client_ops.cpp | 14 ++--
lib/network.cpp | 12 +++-
lib/parse.cpp | 7 +-
lib/procinfo_mac.cpp | 13 ++--
lib/str_util.cpp | 1 +
lib/util.cpp | 5 +-
lib/win_util.cpp | 10 +--
lib/win_util.h | 4 +-
sched/hr.cpp | 2 +-
sched/hr_info.h | 7 ++
version.log | 2 +-
55 files changed, 323 insertions(+), 170 deletions(-)
diff --git a/android/BOINC/AndroidManifest.xml b/android/BOINC/AndroidManifest.xml
index 0c148ba..c31d591 100644
--- a/android/BOINC/AndroidManifest.xml
+++ b/android/BOINC/AndroidManifest.xml
@@ -20,8 +20,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="edu.berkeley.boinc"
android:installLocation="internalOnly"
- android:versionCode="101"
- android:versionName="7.4.27" > <!-- installation on SD card would break boot receiver -->
+ android:versionCode="104"
+ android:versionName="7.4.30" > <!-- installation on SD card would break boot receiver -->
<!-- Add Google Play store metadata informing the store we can run on tablets and other large screen devices -->
@@ -32,9 +32,8 @@
android:smallScreens="true"
android:xlargeScreens="true" />
- <!-- CAUTION: increasing targetSDK to >9 removes menu button on new devices -->
<uses-sdk
- android:minSdkVersion="9"
+ android:minSdkVersion="16"
android:targetSdkVersion="19" />
<!-- Required Permissions -->
@@ -47,11 +46,10 @@
<application
android:allowBackup="true"
- android:debuggable="true"
android:icon="@drawable/boinc"
android:label="@string/app_name"
- android:theme="@style/Theme.Styled" > <!-- android:largeHeap="true" , possible api level > 10. grants application larger dalvik vm heap. better performance when showing many slideshow pictures. -->
-
+ android:theme="@style/Theme.Styled"
+ android:largeHeap="true">
<activity
android:name="edu.berkeley.boinc.SplashActivity"
diff --git a/android/BOINC/src/edu/berkeley/boinc/client/Monitor.java b/android/BOINC/src/edu/berkeley/boinc/client/Monitor.java
index 8a3ab22..d64e270 100644
--- a/android/BOINC/src/edu/berkeley/boinc/client/Monitor.java
+++ b/android/BOINC/src/edu/berkeley/boinc/client/Monitor.java
@@ -534,8 +534,11 @@ public class Monitor extends Service {
// set Android model as hostinfo
// should output something like "Samsung Galaxy SII - SDK:15 ABI:armeabi-v7a"
String model = Build.MANUFACTURER + " " + Build.MODEL + " - SDK:" + Build.VERSION.SDK_INT + " ABI: " + Build.CPU_ABI;
+ String version = Build.VERSION.RELEASE;
if(Logging.DEBUG) Log.d(Logging.TAG,"reporting hostinfo model name: " + model);
- clientInterface.setHostInfo(model);
+ if(Logging.DEBUG) Log.d(Logging.TAG,"reporting hostinfo os name: Android");
+ if(Logging.DEBUG) Log.d(Logging.TAG,"reporting hostinfo os version: " + version);
+ clientInterface.setHostInfo(model, version);
init = true;
} catch(Exception e) {if(Logging.ERROR) Log.e(Logging.TAG,"Monitor.clientSetup() init failed: " + e.getMessage());}
diff --git a/android/BOINC/src/edu/berkeley/boinc/rpc/RpcClient.java b/android/BOINC/src/edu/berkeley/boinc/rpc/RpcClient.java
index b21e897..662ba53 100644
--- a/android/BOINC/src/edu/berkeley/boinc/rpc/RpcClient.java
+++ b/android/BOINC/src/edu/berkeley/boinc/rpc/RpcClient.java
@@ -656,12 +656,20 @@ public class RpcClient {
* Reports the Android model as host info to the client
* @return true for success, false for failure
*/
- public synchronized boolean setHostInfo(String hostInfo){
+ public synchronized boolean setHostInfo(String hostInfo, String version){
mLastErrorMessage = null;
mRequest.setLength(0);
- mRequest.append("<set_host_info>\n <host_info>\n <product_name>");
+ mRequest.append("<set_host_info>\n");
+ mRequest.append(" <host_info>\n");
+ mRequest.append(" <product_name>");
mRequest.append(hostInfo);
- mRequest.append("</product_name>\n </host_info>\n</set_host_info>\n");
+ mRequest.append(" </product_name>\n");
+ mRequest.append(" <os_name>Android</os_name>");
+ mRequest.append(" <os_version>");
+ mRequest.append(version);
+ mRequest.append(" </os_version>\n");
+ mRequest.append(" </host_info>\n");
+ mRequest.append("</set_host_info>\n");
try {
sendRequest(mRequest.toString());
SimpleReplyParser parser = SimpleReplyParser.parse(receiveReply());
diff --git a/android/build_boinc_arm.sh b/android/build_boinc_arm.sh
index 52183cc..fe26b12 100755
--- a/android/build_boinc_arm.sh
+++ b/android/build_boinc_arm.sh
@@ -22,9 +22,9 @@ export PATH="$PATH:$TCBINARIES:$TCINCLUDES/bin"
export CC=arm-linux-androideabi-gcc
export CXX=arm-linux-androideabi-g++
export LD=arm-linux-androideabi-ld
-export CFLAGS="--sysroot=$TCSYSROOT -DANDROID -DDECLARE_TIMEZONE -Wall -I$TCINCLUDES/include -O3 -fomit-frame-pointer"
-export CXXFLAGS="--sysroot=$TCSYSROOT -DANDROID -Wall -I$TCINCLUDES/include -funroll-loops -fexceptions -O3 -fomit-frame-pointer"
-export LDFLAGS="-L$TCSYSROOT/usr/lib -L$TCINCLUDES/lib -llog"
+export CFLAGS="--sysroot=$TCSYSROOT -DANDROID -DDECLARE_TIMEZONE -Wall -I$TCINCLUDES/include -O3 -fomit-frame-pointer -fPIE"
+export CXXFLAGS="--sysroot=$TCSYSROOT -DANDROID -Wall -I$TCINCLUDES/include -funroll-loops -fexceptions -O3 -fomit-frame-pointer -fPIE"
+export LDFLAGS="-L$TCSYSROOT/usr/lib -L$TCINCLUDES/lib -llog -fPIE -pie"
export GDB_CFLAGS="--sysroot=$TCSYSROOT -Wall -g -I$TCINCLUDES/include"
export PKG_CONFIG_SYSROOT_DIR=$TCSYSROOT
diff --git a/android/build_boinc_mips.sh b/android/build_boinc_mips.sh
index c2bf21a..9b30558 100755
--- a/android/build_boinc_mips.sh
+++ b/android/build_boinc_mips.sh
@@ -22,9 +22,9 @@ export PATH="$PATH:$TCBINARIES:$TCINCLUDES/bin"
export CC=mipsel-linux-android-gcc
export CXX=mipsel-linux-android-g++
export LD=mipsel-linux-android-ld
-export CFLAGS="--sysroot=$TCSYSROOT -DANDROID -DDECLARE_TIMEZONE -Wall -I$TCINCLUDES/include -O3 -fomit-frame-pointer"
-export CXXFLAGS="--sysroot=$TCSYSROOT -DANDROID -Wall -I$TCINCLUDES/include -funroll-loops -fexceptions -O3 -fomit-frame-pointer"
-export LDFLAGS="-L$TCSYSROOT/usr/lib -L$TCINCLUDES/lib -llog"
+export CFLAGS="--sysroot=$TCSYSROOT -DANDROID -DDECLARE_TIMEZONE -Wall -I$TCINCLUDES/include -O3 -fomit-frame-pointer -fPIE"
+export CXXFLAGS="--sysroot=$TCSYSROOT -DANDROID -Wall -I$TCINCLUDES/include -funroll-loops -fexceptions -O3 -fomit-frame-pointer -fPIE"
+export LDFLAGS="-L$TCSYSROOT/usr/lib -L$TCINCLUDES/lib -llog -fPIE -pie"
export GDB_CFLAGS="--sysroot=$TCSYSROOT -Wall -g -I$TCINCLUDES/include"
export PKG_CONFIG_SYSROOT_DIR=$TCSYSROOT
diff --git a/android/build_boinc_x86.sh b/android/build_boinc_x86.sh
index ff9c78d..079e78a 100755
--- a/android/build_boinc_x86.sh
+++ b/android/build_boinc_x86.sh
@@ -22,9 +22,9 @@ export PATH="$PATH:$TCBINARIES:$TCINCLUDES/bin"
export CC=i686-linux-android-gcc
export CXX=i686-linux-android-g++
export LD=i686-linux-android-ld
-export CFLAGS="--sysroot=$TCSYSROOT -DANDROID -DDECLARE_TIMEZONE -Wall -I$TCINCLUDES/include -O3 -fomit-frame-pointer"
-export CXXFLAGS="--sysroot=$TCSYSROOT -DANDROID -Wall -I$TCINCLUDES/include -funroll-loops -fexceptions -O3 -fomit-frame-pointer"
-export LDFLAGS="-L$TCSYSROOT/usr/lib -L$TCINCLUDES/lib -llog"
+export CFLAGS="--sysroot=$TCSYSROOT -DANDROID -DDECLARE_TIMEZONE -Wall -I$TCINCLUDES/include -O3 -fomit-frame-pointer -fPIE"
+export CXXFLAGS="--sysroot=$TCSYSROOT -DANDROID -Wall -I$TCINCLUDES/include -funroll-loops -fexceptions -O3 -fomit-frame-pointer -fPIE"
+export LDFLAGS="-L$TCSYSROOT/usr/lib -L$TCINCLUDES/lib -llog -fPIE -pie"
export GDB_CFLAGS="--sysroot=$TCSYSROOT -Wall -g -I$TCINCLUDES/include"
export PKG_CONFIG_SYSROOT_DIR=$TCSYSROOT
diff --git a/android/build_curl_arm.sh b/android/build_curl_arm.sh
index 391b309..5e6f0bd 100755
--- a/android/build_curl_arm.sh
+++ b/android/build_curl_arm.sh
@@ -22,9 +22,9 @@ export PATH="$PATH:$TCBINARIES:$TCINCLUDES/bin"
export CC=arm-linux-androideabi-gcc
export CXX=arm-linux-androideabi-g++
export LD=arm-linux-androideabi-ld
-export CFLAGS="--sysroot=$TCSYSROOT -DANDROID -Wall -I$TCINCLUDES/include -O3 -fomit-frame-pointer"
-export CXXFLAGS="--sysroot=$TCSYSROOT -DANDROID -Wall -funroll-loops -fexceptions -O3 -fomit-frame-pointer"
-export LDFLAGS="-L$TCSYSROOT/usr/lib -L$TCINCLUDES/lib -llog"
+export CFLAGS="--sysroot=$TCSYSROOT -DANDROID -Wall -I$TCINCLUDES/include -O3 -fomit-frame-pointer -fPIE"
+export CXXFLAGS="--sysroot=$TCSYSROOT -DANDROID -Wall -funroll-loops -fexceptions -O3 -fomit-frame-pointer -fPIE"
+export LDFLAGS="-L$TCSYSROOT/usr/lib -L$TCINCLUDES/lib -llog -fPIE -pie"
export GDB_CFLAGS="--sysroot=$TCSYSROOT -Wall -g -I$TCINCLUDES/include"
# Prepare android toolchain and environment
diff --git a/android/build_curl_mips.sh b/android/build_curl_mips.sh
index 9ee92c1..ca24267 100755
--- a/android/build_curl_mips.sh
+++ b/android/build_curl_mips.sh
@@ -22,9 +22,9 @@ export PATH="$PATH:$TCBINARIES:$TCINCLUDES/bin"
export CC=mipsel-linux-android-gcc
export CXX=mipsel-linux-android-g++
export LD=mipsel-linux-android-ld
-export CFLAGS="--sysroot=$TCSYSROOT -DANDROID -Wall -I$TCINCLUDES/include -O3 -fomit-frame-pointer"
-export CXXFLAGS="--sysroot=$TCSYSROOT -DANDROID -Wall -funroll-loops -fexceptions -O3 -fomit-frame-pointer"
-export LDFLAGS="-L$TCSYSROOT/usr/lib -L$TCINCLUDES/lib -llog"
+export CFLAGS="--sysroot=$TCSYSROOT -DANDROID -Wall -I$TCINCLUDES/include -O3 -fomit-frame-pointer -fPIE"
+export CXXFLAGS="--sysroot=$TCSYSROOT -DANDROID -Wall -funroll-loops -fexceptions -O3 -fomit-frame-pointer -fPIE"
+export LDFLAGS="-L$TCSYSROOT/usr/lib -L$TCINCLUDES/lib -llog -fPIE -pie"
export GDB_CFLAGS="--sysroot=$TCSYSROOT -Wall -g -I$TCINCLUDES/include"
# Prepare android toolchain and environment
diff --git a/android/build_curl_x86.sh b/android/build_curl_x86.sh
index c9b52df..6de24cf 100755
--- a/android/build_curl_x86.sh
+++ b/android/build_curl_x86.sh
@@ -22,9 +22,9 @@ export PATH="$PATH:$TCBINARIES:$TCINCLUDES/bin"
export CC=i686-linux-android-gcc
export CXX=i686-linux-android-g++
export LD=i686-linux-android-ld
-export CFLAGS="--sysroot=$TCSYSROOT -DANDROID -Wall -I$TCINCLUDES/include -O3 -fomit-frame-pointer"
-export CXXFLAGS="--sysroot=$TCSYSROOT -DANDROID -Wall -funroll-loops -fexceptions -O3 -fomit-frame-pointer"
-export LDFLAGS="-L$TCSYSROOT/usr/lib -L$TCINCLUDES/lib -llog"
+export CFLAGS="--sysroot=$TCSYSROOT -DANDROID -Wall -I$TCINCLUDES/include -O3 -fomit-frame-pointer -fPIE"
+export CXXFLAGS="--sysroot=$TCSYSROOT -DANDROID -Wall -funroll-loops -fexceptions -O3 -fomit-frame-pointer -fPIE"
+export LDFLAGS="-L$TCSYSROOT/usr/lib -L$TCINCLUDES/lib -llog -fPIE -pie"
export GDB_CFLAGS="--sysroot=$TCSYSROOT -Wall -g -I$TCINCLUDES/include"
# Prepare android toolchain and environment
diff --git a/android/build_libraries_arm.sh b/android/build_libraries_arm.sh
index 94d7a91..1e3c9d0 100755
--- a/android/build_libraries_arm.sh
+++ b/android/build_libraries_arm.sh
@@ -23,9 +23,9 @@ export PATH="$PATH:$TCBINARIES:$TCINCLUDES/bin"
export CC=arm-linux-androideabi-gcc
export CXX=arm-linux-androideabi-g++
export LD=arm-linux-androideabi-ld
-export CFLAGS="--sysroot=$TCSYSROOT -DANDROID -DDECLARE_TIMEZONE -Wall -I$TCINCLUDES/include -O3 -fomit-frame-pointer"
-export CXXFLAGS="--sysroot=$TCSYSROOT -DANDROID -Wall -I$TCINCLUDES/include -funroll-loops -fexceptions -O3 -fomit-frame-pointer"
-export LDFLAGS="-L$TCSYSROOT/usr/lib -L$TCINCLUDES/lib -llog"
+export CFLAGS="--sysroot=$TCSYSROOT -DANDROID -DDECLARE_TIMEZONE -Wall -I$TCINCLUDES/include -O3 -fomit-frame-pointer -fPIE"
+export CXXFLAGS="--sysroot=$TCSYSROOT -DANDROID -Wall -I$TCINCLUDES/include -funroll-loops -fexceptions -O3 -fomit-frame-pointer -fPIE"
+export LDFLAGS="-L$TCSYSROOT/usr/lib -L$TCINCLUDES/lib -llog -fPIE -pie"
export GDB_CFLAGS="--sysroot=$TCSYSROOT -Wall -g -I$TCINCLUDES/include"
export PKG_CONFIG_SYSROOT_DIR=$TCSYSROOT
diff --git a/android/build_libraries_mips.sh b/android/build_libraries_mips.sh
index 50973e7..34b9a15 100755
--- a/android/build_libraries_mips.sh
+++ b/android/build_libraries_mips.sh
@@ -23,9 +23,9 @@ export PATH="$PATH:$TCBINARIES:$TCINCLUDES/bin"
export CC=mipsel-linux-android-gcc
export CXX=mipsel-linux-android-g++
export LD=mipsel-linux-android-ld
-export CFLAGS="--sysroot=$TCSYSROOT -DANDROID -DDECLARE_TIMEZONE -Wall -I$TCINCLUDES/include -O3 -fomit-frame-pointer"
-export CXXFLAGS="--sysroot=$TCSYSROOT -DANDROID -Wall -I$TCINCLUDES/include -funroll-loops -fexceptions -O3 -fomit-frame-pointer"
-export LDFLAGS="-L$TCSYSROOT/usr/lib -L$TCINCLUDES/lib -llog"
+export CFLAGS="--sysroot=$TCSYSROOT -DANDROID -DDECLARE_TIMEZONE -Wall -I$TCINCLUDES/include -O3 -fomit-frame-pointer -fPIE"
+export CXXFLAGS="--sysroot=$TCSYSROOT -DANDROID -Wall -I$TCINCLUDES/include -funroll-loops -fexceptions -O3 -fomit-frame-pointer -fPIE"
+export LDFLAGS="-L$TCSYSROOT/usr/lib -L$TCINCLUDES/lib -llog -fPIE -pie"
export GDB_CFLAGS="--sysroot=$TCSYSROOT -Wall -g -I$TCINCLUDES/include"
export PKG_CONFIG_SYSROOT_DIR=$TCSYSROOT
diff --git a/android/build_libraries_x86.sh b/android/build_libraries_x86.sh
index de9deb9..23a4b1f 100755
--- a/android/build_libraries_x86.sh
+++ b/android/build_libraries_x86.sh
@@ -23,9 +23,9 @@ export PATH="$PATH:$TCBINARIES:$TCINCLUDES/bin"
export CC=i686-linux-android-gcc
export CXX=i686-linux-android-g++
export LD=i686-linux-android-ld
-export CFLAGS="--sysroot=$TCSYSROOT -DANDROID -DDECLARE_TIMEZONE -Wall -I$TCINCLUDES/include -O3 -fomit-frame-pointer"
-export CXXFLAGS="--sysroot=$TCSYSROOT -DANDROID -Wall -I$TCINCLUDES/include -funroll-loops -fexceptions -O3 -fomit-frame-pointer"
-export LDFLAGS="-L$TCSYSROOT/usr/lib -L$TCINCLUDES/lib -llog"
+export CFLAGS="--sysroot=$TCSYSROOT -DANDROID -DDECLARE_TIMEZONE -Wall -I$TCINCLUDES/include -O3 -fomit-frame-pointer -fPIE"
+export CXXFLAGS="--sysroot=$TCSYSROOT -DANDROID -Wall -I$TCINCLUDES/include -funroll-loops -fexceptions -O3 -fomit-frame-pointer -fPIE"
+export LDFLAGS="-L$TCSYSROOT/usr/lib -L$TCINCLUDES/lib -llog -fPIE -pie"
export GDB_CFLAGS="--sysroot=$TCSYSROOT -Wall -g -I$TCINCLUDES/include"
export PKG_CONFIG_SYSROOT_DIR=$TCSYSROOT
diff --git a/android/build_openssl_arm.sh b/android/build_openssl_arm.sh
index e0cf18e..89a55c5 100755
--- a/android/build_openssl_arm.sh
+++ b/android/build_openssl_arm.sh
@@ -22,9 +22,9 @@ export PATH="$PATH:$TCBINARIES:$TCINCLUDES/bin"
export CC=arm-linux-androideabi-gcc
export CXX=arm-linux-androideabi-g++
export LD=arm-linux-androideabi-ld
-export CFLAGS="--sysroot=$TCSYSROOT -DANDROID -Wall -I$TCINCLUDES/include -O3 -fomit-frame-pointer"
-export CXXFLAGS="--sysroot=$TCSYSROOT -DANDROID -Wall -funroll-loops -fexceptions -O3 -fomit-frame-pointer"
-export LDFLAGS="-L$TCSYSROOT/usr/lib -L$TCINCLUDES/lib -llog"
+export CFLAGS="--sysroot=$TCSYSROOT -DANDROID -Wall -I$TCINCLUDES/include -O3 -fomit-frame-pointer -fPIE"
+export CXXFLAGS="--sysroot=$TCSYSROOT -DANDROID -Wall -funroll-loops -fexceptions -O3 -fomit-frame-pointer -fPIE"
+export LDFLAGS="-L$TCSYSROOT/usr/lib -L$TCINCLUDES/lib -llog -fPIE -pie"
export GDB_CFLAGS="--sysroot=$TCSYSROOT -Wall -g -I$TCINCLUDES/include"
# Prepare android toolchain and environment
diff --git a/android/build_openssl_mips.sh b/android/build_openssl_mips.sh
index 4589a49..758596a 100755
--- a/android/build_openssl_mips.sh
+++ b/android/build_openssl_mips.sh
@@ -22,9 +22,9 @@ export PATH="$PATH:$TCBINARIES:$TCINCLUDES/bin"
export CC=mipsel-linux-android-gcc
export CXX=mipsel-linux-android-g++
export LD=mipsel-linux-android-ld
-export CFLAGS="--sysroot=$TCSYSROOT -DANDROID -Wall -I$TCINCLUDES/include -O3 -fomit-frame-pointer"
-export CXXFLAGS="--sysroot=$TCSYSROOT -DANDROID -Wall -funroll-loops -fexceptions -O3 -fomit-frame-pointer"
-export LDFLAGS="-L$TCSYSROOT/usr/lib -L$TCINCLUDES/lib -llog"
+export CFLAGS="--sysroot=$TCSYSROOT -DANDROID -Wall -I$TCINCLUDES/include -O3 -fomit-frame-pointer -fPIE"
+export CXXFLAGS="--sysroot=$TCSYSROOT -DANDROID -Wall -funroll-loops -fexceptions -O3 -fomit-frame-pointer -fPIE"
+export LDFLAGS="-L$TCSYSROOT/usr/lib -L$TCINCLUDES/lib -llog -fPIE -pie"
export GDB_CFLAGS="--sysroot=$TCSYSROOT -Wall -g -I$TCINCLUDES/include"
# Prepare android toolchain and environment
diff --git a/android/build_openssl_x86.sh b/android/build_openssl_x86.sh
index fb1b86b..f28b4e4 100755
--- a/android/build_openssl_x86.sh
+++ b/android/build_openssl_x86.sh
@@ -22,9 +22,9 @@ export PATH="$PATH:$TCBINARIES:$TCINCLUDES/bin"
export CC=i686-linux-android-gcc
export CXX=i686-linux-android-g++
export LD=i686-linux-android-ld
-export CFLAGS="--sysroot=$TCSYSROOT -DANDROID -Wall -I$TCINCLUDES/include -O3 -fomit-frame-pointer"
-export CXXFLAGS="--sysroot=$TCSYSROOT -DANDROID -Wall -funroll-loops -fexceptions -O3 -fomit-frame-pointer"
-export LDFLAGS="-L$TCSYSROOT/usr/lib -L$TCINCLUDES/lib -llog"
+export CFLAGS="--sysroot=$TCSYSROOT -DANDROID -Wall -I$TCINCLUDES/include -O3 -fomit-frame-pointer -fPIE"
+export CXXFLAGS="--sysroot=$TCSYSROOT -DANDROID -Wall -funroll-loops -fexceptions -O3 -fomit-frame-pointer -fPIE"
+export LDFLAGS="-L$TCSYSROOT/usr/lib -L$TCINCLUDES/lib -llog -fPIE -pie"
export GDB_CFLAGS="--sysroot=$TCSYSROOT -Wall -g -I$TCINCLUDES/include"
# Prepare android toolchain and environment
diff --git a/client/acct_setup.cpp b/client/acct_setup.cpp
index 1161ca1..79da0a7 100644
--- a/client/acct_setup.cpp
+++ b/client/acct_setup.cpp
@@ -82,6 +82,7 @@ void ACCOUNT_IN::parse(XML_PARSER& xp) {
passwd_hash = "";
user_name = "";
team_name = "";
+ ldap_auth = false;
while (!xp.get_tag()) {
if (xp.parse_string("url", url)) continue;
@@ -89,6 +90,7 @@ void ACCOUNT_IN::parse(XML_PARSER& xp) {
if (xp.parse_string("passwd_hash", passwd_hash)) continue;
if (xp.parse_string("user_name", user_name)) continue;
if (xp.parse_string("team_name", team_name)) continue;
+ if (xp.parse_bool("ldap_auth", ldap_auth)) continue;
}
canonicalize_master_url(url);
}
@@ -134,26 +136,26 @@ int LOOKUP_ACCOUNT_OP::do_rpc(ACCOUNT_IN& ai) {
canonicalize_master_url(url);
url += "lookup_account.php";
- if (strchr(ai.email_addr.c_str(), '@')) {
- url += "?email_addr=";
+ if (ai.ldap_auth && !strchr(ai.email_addr.c_str(), '@')) {
+ // LDAP case
+ //
+ if (!is_https(ai.url.c_str())) return ERR_NEED_HTTPS;
+ url += "?ldap_auth=1&ldap_uid=";
parameter = ai.email_addr;
escape_url(parameter);
url += parameter;
- url += "&passwd_hash=";
+ url += "&passwd=";
parameter = ai.passwd_hash;
escape_url(parameter);
url += parameter;
} else {
- // LDAP case
- //
- if (!is_https(ai.url.c_str())) return ERR_NEED_HTTPS;
- url += "?ldap_auth=1&ldap_uid=";
+ url += "?email_addr=";
parameter = ai.email_addr;
escape_url(parameter);
url += parameter;
- url += "&passwd=";
+ url += "&passwd_hash=";
parameter = ai.passwd_hash;
escape_url(parameter);
url += parameter;
diff --git a/client/acct_setup.h b/client/acct_setup.h
index 10f8f75..6bc8be7 100644
--- a/client/acct_setup.h
+++ b/client/acct_setup.h
@@ -43,6 +43,7 @@ struct ACCOUNT_IN {
// the suggested friendly name for the user during account creation.
std::string team_name;
std::string passwd_hash;
+ bool ldap_auth;
void parse(XML_PARSER&);
};
diff --git a/client/app.cpp b/client/app.cpp
index 3c85200..f721d40 100644
--- a/client/app.cpp
+++ b/client/app.cpp
@@ -166,7 +166,7 @@ int ACTIVE_TASK::preempt(int preempt_type, int reason) {
case REMOVE_MAYBE_SCHED:
// GPU jobs: always remove from mem, since it's tying up GPU RAM
//
- if (result->uses_coprocs()) {
+ if (result->uses_gpu()) {
remove = true;
break;
}
diff --git a/client/app_config.cpp b/client/app_config.cpp
index a84f062..cb031f5 100644
--- a/client/app_config.cpp
+++ b/client/app_config.cpp
@@ -27,13 +27,49 @@
bool have_max_concurrent = false;
+int APP_CONFIG::parse_gpu_versions(XML_PARSER& xp, PROJECT* p) {
+ double x;
+ while (!xp.get_tag()) {
+ if (xp.match_tag("/gpu_versions")) return 0;
+ else if (xp.parse_double("gpu_usage", x)) {
+ if (x <= 0) {
+ msg_printf(p, MSG_USER_ALERT,
+ "gpu_usage must be positive in app_config.xml"
+ );
+ } else {
+ gpu_gpu_usage = x;
+ }
+ continue;
+ }
+ else if (xp.parse_double("cpu_usage", x)) {
+ if (x < 0) {
+ msg_printf(p, MSG_USER_ALERT,
+ "cpu_usage must be non-negative in app_config.xml"
+ );
+ } else {
+ gpu_cpu_usage = x;
+ }
+ continue;
+ }
+ if (log_flags.unparsed_xml) {
+ msg_printf(p, MSG_INFO,
+ "Unparsed line in app_config.xml: %s",
+ xp.parsed_tag
+ );
+ }
+ }
+ msg_printf_notice(p, false, NULL,
+ "missing </gpu_versions> in app_config.xml"
+ );
+ return ERR_XML_PARSE;
+}
+
// In these parsing functions, if there's an error you must
// - generate a notice containing the string "app_config.xml"
// - return an error code
//
int APP_CONFIG::parse(XML_PARSER& xp, PROJECT* p) {
memset(this, 0, sizeof(APP_CONFIG));
- double x;
while (!xp.get_tag()) {
if (xp.match_tag("/app")) return 0;
@@ -43,29 +79,8 @@ int APP_CONFIG::parse(XML_PARSER& xp, PROJECT* p) {
continue;
}
if (xp.match_tag("gpu_versions")) {
- while (!xp.get_tag()) {
- if (xp.match_tag("/gpu_versions")) break;
- if (xp.parse_double("gpu_usage", x)) {
- if (x <= 0) {
- msg_printf(p, MSG_USER_ALERT,
- "gpu_usage must be positive in app_config.xml"
- );
- } else {
- gpu_gpu_usage = x;
- }
- continue;
- }
- if (xp.parse_double("cpu_usage", x)) {
- if (x < 0) {
- msg_printf(p, MSG_USER_ALERT,
- "cpu_usage must be non-negative in app_config.xml"
- );
- } else {
- gpu_cpu_usage = x;
- }
- continue;
- }
- }
+ int retval = parse_gpu_versions(xp, p);
+ if (retval) return retval;
continue;
}
if (xp.parse_bool("fraction_done_exact", fraction_done_exact)) {
@@ -82,7 +97,7 @@ int APP_CONFIG::parse(XML_PARSER& xp, PROJECT* p) {
}
xp.skip_unexpected(log_flags.unparsed_xml, "APP_CONFIG::parse");
}
- msg_printf_notice(p, false, NULL,
+ msg_printf(p, MSG_USER_ALERT,
"missing </app> in app_config.xml"
);
return ERR_XML_PARSE;
@@ -92,6 +107,12 @@ int APP_VERSION_CONFIG::parse(XML_PARSER& xp, PROJECT* p) {
memset(this, 0, sizeof(APP_VERSION_CONFIG));
while (!xp.get_tag()) {
+ if (!xp.is_tag) {
+ msg_printf_notice(p, false, NULL,
+ "unexpected text '%s' in app_config.xml", xp.parsed_tag
+ );
+ return ERR_XML_PARSE;
+ }
if (xp.match_tag("/app_version")) return 0;
if (xp.parse_str("app_name", app_name, 256)) continue;
if (xp.parse_str("plan_class", plan_class, 256)) continue;
@@ -106,7 +127,7 @@ int APP_VERSION_CONFIG::parse(XML_PARSER& xp, PROJECT* p) {
}
xp.skip_unexpected(log_flags.unparsed_xml, "APP_VERSION_CONFIG::parse");
}
- msg_printf_notice(p, false, NULL,
+ msg_printf(p, MSG_USER_ALERT,
"missing </app_version> in app_config.xml"
);
return ERR_XML_PARSE;
@@ -114,9 +135,15 @@ int APP_VERSION_CONFIG::parse(XML_PARSER& xp, PROJECT* p) {
int APP_CONFIGS::parse(XML_PARSER& xp, PROJECT* p) {
int n;
- app_configs.clear();
+ clear();
if (!xp.parse_start("app_config")) return ERR_XML_PARSE;
while (!xp.get_tag()) {
+ if (!xp.is_tag) {
+ msg_printf_notice(p, false, NULL,
+ "unexpected text '%s' in app_config.xml", xp.parsed_tag
+ );
+ return ERR_XML_PARSE;
+ }
if (xp.match_tag("/app_config")) return 0;
if (xp.match_tag("app")) {
APP_CONFIG ac;
@@ -147,7 +174,7 @@ int APP_CONFIGS::parse(XML_PARSER& xp, PROJECT* p) {
}
xp.skip_unexpected(log_flags.unparsed_xml, "APP_CONFIGS::parse");
}
- msg_printf_notice(p, false, NULL,
+ msg_printf(p, MSG_USER_ALERT,
"missing </app_config> in app_config.xml"
);
return ERR_XML_PARSE;
diff --git a/client/app_config.h b/client/app_config.h
index 1dc88ab..0bb198f 100644
--- a/client/app_config.h
+++ b/client/app_config.h
@@ -35,6 +35,7 @@ struct APP_CONFIG {
bool fraction_done_exact;
int parse(XML_PARSER&, PROJECT*);
+ int parse_gpu_versions(XML_PARSER&, PROJECT*);
};
struct APP_VERSION_CONFIG {
diff --git a/client/client_msgs.cpp b/client/client_msgs.cpp
index 30c5a69..024898f 100644
--- a/client/client_msgs.cpp
+++ b/client/client_msgs.cpp
@@ -93,11 +93,9 @@ void show_message(
case MSG_SCHEDULER_ALERT:
char buf[1024];
if (is_html) {
- xml_escape(message, buf, 1024);
+ strcpy(buf, message);
} else {
- char buf2[1024];
- xml_escape(message, buf2, 1024);
- xml_escape(buf2, buf, 1024);
+ xml_escape(message, buf, 1024);
}
NOTICE n;
n.description = buf;
diff --git a/client/client_state.cpp b/client/client_state.cpp
index af5d20d..16779b8 100644
--- a/client/client_state.cpp
+++ b/client/client_state.cpp
@@ -419,9 +419,9 @@ int CLIENT_STATE::init() {
// check for GPUs.
//
for (int j=1; j<coprocs.n_rsc; j++) {
- msg_printf(NULL, MSG_INFO, "GPU specified in cc_config.xml: %d %s",
- coprocs.coprocs[j].count,
- coprocs.coprocs[j].type
+ msg_printf(NULL, MSG_INFO, "Coprocessor specified in cc_config.xml: type %s count %d",
+ coprocs.coprocs[j].type,
+ coprocs.coprocs[j].count
);
}
if (!cc_config.no_gpus
@@ -971,6 +971,7 @@ bool CLIENT_STATE::poll_slow_events() {
} else {
msg_printf(NULL, MSG_INFO, "Resuming file transfers");
}
+ request_schedule_cpus("network resumed");
}
// if we're emerging from a bandwidth quota suspension,
@@ -1964,7 +1965,7 @@ int CLIENT_STATE::reset_project(PROJECT* project, bool detaching) {
// app_config.xml, but this isn't likely to exist on Android.
//
if (!project->anonymous_platform) {
- client_clean_out_dir(project.project_dir(), "reset project");
+ client_clean_out_dir(project->project_dir(), "reset project");
}
#endif
diff --git a/client/client_types.h b/client/client_types.h
index c8cd98f..c7d753f 100644
--- a/client/client_types.h
+++ b/client/client_types.h
@@ -276,7 +276,7 @@ struct APP {
};
struct GPU_USAGE {
- int rsc_type;
+ int rsc_type; // index into COPROCS array
double usage;
};
diff --git a/client/cpu_sched.cpp b/client/cpu_sched.cpp
index d4b6ef7..b8e40b7 100644
--- a/client/cpu_sched.cpp
+++ b/client/cpu_sched.cpp
@@ -151,8 +151,10 @@ struct PROC_RESOURCES {
}
}
if (rp->schedule_backoff > gstate.now) return false;
- if (rp->uses_coprocs()) {
+ if (rp->uses_gpu()) {
if (gpu_suspend_reason) return false;
+ }
+ if (rp->uses_coprocs()) {
if (sufficient_coprocs(*rp)) {
return true;
} else {
@@ -1045,7 +1047,7 @@ void CLIENT_STATE::append_unfinished_time_slice(vector<RESULT*> &run_list) {
ACTIVE_TASK* atp = active_tasks.active_tasks[i];
atp->overdue_checkpoint = false;
if (!atp->result->runnable()) continue;
- if (atp->result->uses_coprocs() && gpu_suspend_reason) continue;
+ if (atp->result->uses_gpu() && gpu_suspend_reason) continue;
if (atp->result->non_cpu_intensive()) continue;
if (atp->scheduler_state != CPU_SCHED_SCHEDULED) continue;
if (finished_time_slice(atp)) continue;
@@ -1190,7 +1192,7 @@ bool CLIENT_STATE::enforce_run_list(vector<RESULT*>& run_list) {
// if we're already using all the CPUs,
// don't allow additional CPU jobs;
- // allow GPU jobs if the resulting CPU load is at most ncpus+1
+ // allow coproc jobs if the resulting CPU load is at most ncpus+1
//
if (ncpus_used >= ncpus) {
if (rp->uses_coprocs()) {
@@ -1217,7 +1219,7 @@ bool CLIENT_STATE::enforce_run_list(vector<RESULT*>& run_list) {
#if 0
// Don't overcommit CPUs by > 1 if a MT job is scheduled.
- // Skip this check for GPU jobs.
+ // Skip this check for coproc jobs.
//
if (!rp->uses_coprocs()
&& (scheduled_mt || (rp->avp->avg_ncpus > 1))
@@ -1255,7 +1257,9 @@ bool CLIENT_STATE::enforce_run_list(vector<RESULT*>& run_list) {
if (log_flags.cpu_sched_debug) {
msg_printf(rp->project, MSG_INFO,
- "[cpu_sched_debug] scheduling %s", rp->name
+ "[cpu_sched_debug] scheduling %s%s",
+ rp->name,
+ rp->edf_scheduled?" (high priority)":""
);
}
@@ -1337,7 +1341,7 @@ bool CLIENT_STATE::enforce_run_list(vector<RESULT*>& run_list) {
// remove from memory GPU jobs that were suspended by CPU throttling
// and are now unscheduled.
//
- if (atp->result->uses_coprocs()) {
+ if (atp->result->uses_gpu()) {
atp->preempt(REMOVE_ALWAYS);
request_schedule_cpus("removed suspended GPU task");
break;
diff --git a/client/cs_prefs.cpp b/client/cs_prefs.cpp
index df7e1d4..2b83a49 100644
--- a/client/cs_prefs.cpp
+++ b/client/cs_prefs.cpp
@@ -463,8 +463,9 @@ void CLIENT_STATE::check_suspend_network() {
}
#ifndef ANDROID
-// allow network transfers while user active, i.e. screen on.
-// otherwise nothing (visible to the user) happens after intial attach
+ // allow network transfers while user active, i.e. screen on.
+ // otherwise nothing (visible to the user) happens after initial attach
+ //
if (!global_prefs.run_if_user_active && user_active) {
file_xfers_suspended = true;
if (!recent_rpc) network_suspended = true;
diff --git a/client/cs_scheduler.cpp b/client/cs_scheduler.cpp
index 2dbceac..f0e7b59 100644
--- a/client/cs_scheduler.cpp
+++ b/client/cs_scheduler.cpp
@@ -919,10 +919,17 @@ int CLIENT_STATE::handle_scheduler_reply(
est_rsc_runtime[j] = 0;
}
for (i=0; i<sr.results.size(); i++) {
- if (lookup_result(project, sr.results[i].name)) {
- msg_printf(project, MSG_INTERNAL_ERROR,
- "Already have task %s\n", sr.results[i].name
- );
+ RESULT* rp2 = lookup_result(project, sr.results[i].name);
+ if (rp2) {
+ // see if project wants to change the job's deadline
+ //
+ if (sr.results[i].report_deadline != rp2->report_deadline) {
+ rp2->report_deadline = sr.results[i].report_deadline;
+ } else {
+ msg_printf(project, MSG_INTERNAL_ERROR,
+ "Already have task %s\n", sr.results[i].name
+ );
+ }
continue;
}
RESULT* rp = new RESULT;
diff --git a/client/cs_statefile.cpp b/client/cs_statefile.cpp
index 34e3737..39c03d0 100644
--- a/client/cs_statefile.cpp
+++ b/client/cs_statefile.cpp
@@ -899,6 +899,13 @@ int CLIENT_STATE::parse_app_info(PROJECT* p, FILE* in) {
delete avp;
continue;
}
+ if (cc_config.dont_use_vbox && strstr(avp->plan_class, "vbox")) {
+ msg_printf(p, MSG_INFO,
+ "skipping vbox app in app_info.xml; vbox disabled in cc_config.xml"
+ );
+ delete avp;
+ continue;
+ }
if (strlen(avp->platform) == 0) {
safe_strcpy(avp->platform, get_primary_platform());
}
diff --git a/client/gui_rpc_server_ops.cpp b/client/gui_rpc_server_ops.cpp
index 24d90db..7b9a2f1 100644
--- a/client/gui_rpc_server_ops.cpp
+++ b/client/gui_rpc_server_ops.cpp
@@ -374,7 +374,7 @@ static void handle_set_gpu_mode(GUI_RPC_CONN& grc) {
grc.mfout.printf("<success/>\n");
}
-// used on Android - get product name and MAC addr from GUI,
+// On Android, get product name, OS name, OS version, and MAC addr from GUI,
//
static void handle_set_host_info(GUI_RPC_CONN& grc) {
while (!grc.xp.get_tag()) {
@@ -388,6 +388,23 @@ static void handle_set_host_info(GUI_RPC_CONN& grc) {
if (strlen(hi.product_name)) {
safe_strcpy(gstate.host_info.product_name, hi.product_name);
}
+
+ // this will always be "Android"
+ //
+ if (strlen(hi.os_name)) {
+ safe_strcpy(gstate.host_info.os_name, hi.os_name);
+ }
+
+ // We already have the Linux kernel version;
+ // append the Android version.
+ //
+ if (strlen(hi.os_version)) {
+ if (!strstr(gstate.host_info.os_version, "Android")) {
+ safe_strcat(gstate.host_info.os_version, " (Android ");
+ safe_strcat(gstate.host_info.os_version, hi.os_version);
+ safe_strcat(gstate.host_info.os_version, ")");
+ }
+ }
grc.mfout.printf("<success/>\n");
gstate.set_client_state_dirty("set_host_info RPC");
return;
diff --git a/client/result.cpp b/client/result.cpp
index 0f223ad..8a27848 100644
--- a/client/result.cpp
+++ b/client/result.cpp
@@ -532,7 +532,12 @@ bool RESULT::runnable() {
if (state() != RESULT_FILES_DOWNLOADED) return false;
if (coproc_missing) return false;
if (schedule_backoff > gstate.now) return false;
- if (avp->needs_network && gstate.network_suspended) return false;
+ if (avp->needs_network && gstate.file_xfers_suspended) {
+ // check file_xfers_suspended rather than network_suspended;
+ // the latter remains false for a period after GUI RPCs
+ //
+ return false;
+ }
return true;
}
diff --git a/client/result.h b/client/result.h
index 685a36c..4239ab9 100644
--- a/client/result.h
+++ b/client/result.h
@@ -144,6 +144,9 @@ struct RESULT {
inline bool uses_coprocs() {
return (avp->gpu_usage.rsc_type != 0);
}
+ inline bool uses_gpu() {
+ return coprocs.coprocs[avp->gpu_usage.rsc_type].is_gpu;
+ }
inline int resource_type() {
return avp->gpu_usage.rsc_type;
}
diff --git a/client/rr_sim.cpp b/client/rr_sim.cpp
index d0f1c0f..33a3fff 100644
--- a/client/rr_sim.cpp
+++ b/client/rr_sim.cpp
@@ -126,7 +126,7 @@ struct RR_SIM {
void set_rrsim_flops(RESULT* rp) {
// For coproc jobs, use app version estimate
//
- if (rp->uses_coprocs()) {
+ if (rp->uses_gpu()) {
rp->rrsim_flops = rp->avp->flops * gstate.overall_gpu_frac();
} else if (rp->avp->needs_network) {
rp->rrsim_flops = rp->avp->flops * gstate.overall_cpu_and_network_frac();
@@ -459,7 +459,7 @@ void RR_SIM::simulate() {
// update busy time of relevant processor types
//
- double frac = rpbest->uses_coprocs()?gstate.overall_gpu_frac():gstate.overall_cpu_frac();
+ double frac = rpbest->uses_gpu()?gstate.overall_gpu_frac():gstate.overall_cpu_frac();
double dur = rpbest->estimated_runtime_remaining() / frac;
rsc_work_fetch[0].update_busy_time(dur, rpbest->avp->avg_ncpus);
int rt = rpbest->avp->gpu_usage.rsc_type;
diff --git a/client/sim.cpp b/client/sim.cpp
index aad116a..0dab9d3 100644
--- a/client/sim.cpp
+++ b/client/sim.cpp
@@ -458,7 +458,8 @@ bool CLIENT_STATE::simulate_rpc(PROJECT* p) {
work_fetch.handle_reply(p, &sr, new_results);
p->nrpc_failures = 0;
p->sched_rpc_pending = 0;
- p->min_rpc_time = now + 900;
+ //p->min_rpc_time = now + 900;
+ p->min_rpc_time = now;
if (sent_something) {
request_schedule_cpus("simulate_rpc");
request_work_fetch("simulate_rpc");
@@ -583,7 +584,7 @@ bool ACTIVE_TASK_SET::poll() {
ACTIVE_TASK* atp = active_tasks[i];
if (atp->task_state() != PROCESS_EXECUTING) continue;
RESULT* rp = atp->result;
- if (rp->uses_coprocs()) {
+ if (rp->uses_gpu()) {
if (gpu_active) {
cpu_usage_gpu += rp->avp->avg_ncpus;
}
@@ -605,12 +606,12 @@ bool ACTIVE_TASK_SET::poll() {
ACTIVE_TASK* atp = active_tasks[i];
if (atp->task_state() != PROCESS_EXECUTING) continue;
RESULT* rp = atp->result;
- if (!gpu_active && rp->uses_coprocs()) {
+ if (!gpu_active && rp->uses_gpu()) {
continue;
}
atp->elapsed_time += diff;
double flops = rp->avp->flops;
- if (!rp->uses_coprocs()) {
+ if (!rp->uses_gpu()) {
flops *= cpu_scale;
}
diff --git a/client/sysmon_win.cpp b/client/sysmon_win.cpp
index 20a65bb..77b87fd 100644
--- a/client/sysmon_win.cpp
+++ b/client/sysmon_win.cpp
@@ -295,7 +295,7 @@ static void windows_detect_autoproxy_settings() {
WINHTTP_AUTO_DETECT_TYPE_DHCP | WINHTTP_AUTO_DETECT_TYPE_DNS_A;
autoproxy_options.fAutoLogonIfChallenged = TRUE;
- network_test_url = A2W(cc_config.network_test_url).c_str();
+ network_test_url = boinc_ascii_to_wide(cc_config.network_test_url).c_str();
hWinHttp = WinHttpOpen(
L"BOINC client",
@@ -316,7 +316,7 @@ static void windows_detect_autoproxy_settings() {
// For the time being check to see if proxy_info.lpszProxy is non-null.
//
if (proxy_info.lpszProxy) {
- std::string proxy(W2A(std::wstring(proxy_info.lpszProxy)));
+ std::string proxy(boinc_wide_to_ascii(std::wstring(proxy_info.lpszProxy)));
std::string new_proxy;
if (log_flags.proxy_debug) {
diff --git a/client/work_fetch.cpp b/client/work_fetch.cpp
index 5d7c33b..7f73875 100644
--- a/client/work_fetch.cpp
+++ b/client/work_fetch.cpp
@@ -72,8 +72,7 @@ inline bool has_coproc_app(PROJECT* p, int rsc_type) {
/////////////// RSC_PROJECT_WORK_FETCH ///////////////
-void RSC_PROJECT_WORK_FETCH::rr_init(PROJECT* p, int rsc_type) {
- rsc_project_reason = compute_rsc_project_reason(p, rsc_type);
+void RSC_PROJECT_WORK_FETCH::rr_init() {
fetchable_share = 0;
n_runnable_jobs = 0;
sim_nused = 0;
@@ -397,7 +396,7 @@ void WORK_FETCH::rr_init() {
PROJECT* p = gstate.projects[i];
p->pwf.rr_init(p);
for (int j=0; j<coprocs.n_rsc; j++) {
- p->rsc_pwf[j].rr_init(p, j);
+ p->rsc_pwf[j].rr_init();
}
}
}
@@ -503,7 +502,7 @@ void WORK_FETCH::piggyback_work_request(PROJECT* p) {
case DONT_FETCH_BACKED_OFF:
break;
default:
- WF_DEBUG(msg_printf(p, MSG_INFO, "piggyback: can't fetch %s", rsc_name_long(i));)
+ WF_DEBUG(msg_printf(p, MSG_INFO, "piggyback: can't fetch %s: %s", rsc_name_long(i), rsc_project_reason_string(rpwf.rsc_project_reason));)
continue;
}
bool buffer_low = (rwf.saturated_time < gstate.work_buf_total());
@@ -588,6 +587,19 @@ void WORK_FETCH::setup() {
gstate.compute_nuploading_results();
rr_simulation();
+
+ // Compute rsc_project_reason.
+ // Must do this after rr_simulation() because the logic for
+ // zero-resource-share projects uses #idle instances
+ //
+ for (unsigned int i=0; i<gstate.projects.size(); i++) {
+ PROJECT* p = gstate.projects[i];
+ for (int j=0; j<coprocs.n_rsc; j++) {
+ RSC_PROJECT_WORK_FETCH& rpwf = p->rsc_pwf[j];
+ rpwf.rsc_project_reason = rpwf.compute_rsc_project_reason(p, j);
+ }
+ }
+
compute_shares();
project_priority_init(true);
clear_request();
@@ -649,7 +661,7 @@ PROJECT* WORK_FETCH::choose_project() {
p = gstate.projects[j];
WF_DEBUG(msg_printf(p, MSG_INFO, "scanning");)
if (p->pwf.project_reason) {
- WF_DEBUG(msg_printf(p, MSG_INFO, "skip: cfwr %d", p->pwf.cant_fetch_work_reason);)
+ WF_DEBUG(msg_printf(p, MSG_INFO, "skip: cfwr %d", p->pwf.project_reason);)
continue;
}
@@ -671,7 +683,7 @@ PROJECT* WORK_FETCH::choose_project() {
}
WF_DEBUG(msg_printf(p, MSG_INFO, "can fetch %s", rsc_name_long(i));)
} else {
- WF_DEBUG(msg_printf(p, MSG_INFO, "can't fetch %s", rsc_name_long(i));)
+ WF_DEBUG(msg_printf(p, MSG_INFO, "can't fetch %s: %s", rsc_name_long(i), rsc_project_reason_string(rpwf.rsc_project_reason));)
continue;
}
if (rwf.saturated_time < gstate.work_buf_min()) {
@@ -718,8 +730,14 @@ PROJECT* WORK_FETCH::choose_project() {
}
RSC_PROJECT_WORK_FETCH& rpwf = rwf.project_state(p);
int reason = rpwf.rsc_project_reason;
- if (reason) {
- WF_DEBUG(msg_printf(p, MSG_INFO, "%s can't fetch", rsc_name_long(i));)
+ switch (reason) {
+ case 0:
+ case DONT_FETCH_BACKED_OFF:
+ // request even if backed off - no reason not to.
+ //
+ break;
+ default:
+ WF_DEBUG(msg_printf(p, MSG_INFO, "%s can't fetch: %s", rsc_name_long(i), rsc_project_reason_string(reason));)
continue;
}
}
@@ -1080,7 +1098,6 @@ const char* rsc_project_reason_string(int reason) {
case DONT_FETCH_CONFIG: return "client configuration";
case DONT_FETCH_NO_APPS: return "no applications";
case DONT_FETCH_AMS: return "account manager prefs";
- case DONT_FETCH_BACKOFF: return "backoff";
case DONT_FETCH_ZERO_SHARE: return "zero resource share";
case DONT_FETCH_BUFFER_FULL: return "job cache full";
case DONT_FETCH_NOT_HIGHEST_PRIO: return "not highest priority project";
diff --git a/client/work_fetch.h b/client/work_fetch.h
index c99e9ba..182820d 100644
--- a/client/work_fetch.h
+++ b/client/work_fetch.h
@@ -48,7 +48,6 @@
#define DONT_FETCH_CONFIG 3
#define DONT_FETCH_NO_APPS 4
#define DONT_FETCH_AMS 5
-#define DONT_FETCH_BACKOFF 6
#define DONT_FETCH_ZERO_SHARE 7
#define DONT_FETCH_BUFFER_FULL 8
#define DONT_FETCH_NOT_HIGHEST_PRIO 9
@@ -127,7 +126,7 @@ struct RSC_PROJECT_WORK_FETCH {
int rsc_project_reason;
int compute_rsc_project_reason(PROJECT*, int rsc_type);
void resource_backoff(PROJECT*, const char*);
- void rr_init(PROJECT*, int rsc_type);
+ void rr_init();
void clear_backoff() {
backoff_time = 0;
backoff_interval = 0;
diff --git a/clientgui/ProjectProcessingPage.cpp b/clientgui/ProjectProcessingPage.cpp
index 0ccf98c..ff66a76 100644
--- a/clientgui/ProjectProcessingPage.cpp
+++ b/clientgui/ProjectProcessingPage.cpp
@@ -412,6 +412,7 @@ void CProjectProcessingPage::OnStateChange( CProjectProcessingPageEvent& WXUNUSE
ai->user_name = (const char*)::wxGetUserId().mb_str();
}
//ai->team_name = (const char*)pWA->GetTeamName().mb_str();
+ ai->ldap_auth = pWA->project_config.ldap_auth;
if (pWA->m_AccountInfoPage->m_pAccountCreateCtrl->GetValue()) {
creating_account = true;
diff --git a/clientgui/browser.cpp b/clientgui/browser.cpp
index 38b3747..2d9c0cb 100644
--- a/clientgui/browser.cpp
+++ b/clientgui/browser.cpp
@@ -972,15 +972,15 @@ bool detect_cookie_ie_supported_uac(std::string& project_url, std::string& name,
}
// Convert name into wide character string
- name_w = A2W(name);
+ name_w = boinc_ascii_to_wide(name);
// if we don't find the cookie at the exact project dns name, check one higher
// (i.e. www.worldcommunitygrid.org becomes worldcommunitygrid.org
parse_hostname_ie_compatible(project_url, hostname, domainname);
// InternetGetCookie expects them in URL format
- hostname_w = std::wstring(_T("http://")) + A2W(hostname) + std::wstring(_T("/"));
- domainname_w = std::wstring(_T("http://")) + A2W(domainname) + std::wstring(_T("/"));
+ hostname_w = std::wstring(_T("http://")) + boinc_ascii_to_wide(hostname) + std::wstring(_T("/"));
+ domainname_w = std::wstring(_T("http://")) + boinc_ascii_to_wide(domainname) + std::wstring(_T("/"));
// First check to see if the desired cookie is assigned to the hostname.
rc = pIEGPMC(hostname_w.c_str(), NULL, szCookieBuffer, &dwSize, NULL) == TRUE;
@@ -1011,7 +1011,7 @@ bool detect_cookie_ie_supported_uac(std::string& project_url, std::string& name,
if (0 == wcscmp(name_w.c_str(), strCookieName.c_str())) {
// Now we found it! Yea - auto attach!
- value = W2A(strCookieValue);
+ value = boinc_wide_to_ascii(strCookieValue);
bReturnValue = true;
}
diff --git a/configure.ac b/configure.ac
index 76ca094..8105586 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6,7 +6,7 @@ dnl not sure exactly what the minimum version is (but 2.13 wont work)
AC_PREREQ(2.58)
dnl Set the BOINC version here. You can also use the set-version script.
-AC_INIT(BOINC, 7.4.27)
+AC_INIT(BOINC, 7.4.30)
AC_CONFIG_MACRO_DIR([m4])
LIBBOINC_VERSION=`echo ${PACKAGE_VERSION} | sed 's/\./:/g'`
AC_SUBST([LIBBOINC_VERSION])
diff --git a/lib/app_ipc.cpp b/lib/app_ipc.cpp
index 1a7a290..f012732 100644
--- a/lib/app_ipc.cpp
+++ b/lib/app_ipc.cpp
@@ -32,6 +32,7 @@
#include "str_replace.h"
#include "str_util.h"
#include "url.h"
+#include "util.h"
#include "app_ipc.h"
@@ -306,7 +307,9 @@ int parse_init_data_file(FILE* f, APP_INIT_DATA& ai) {
XML_PARSER xp(&mf);
if (!xp.parse_start("app_init_data")) {
- fprintf(stderr, "no start tag in app init data\n");
+ fprintf(stderr, "%s: no start tag in app init data\n",
+ time_to_string(dtime())
+ );
return ERR_XML_PARSE;
}
@@ -321,7 +324,8 @@ int parse_init_data_file(FILE* f, APP_INIT_DATA& ai) {
while (!xp.get_tag()) {
if (!xp.is_tag) {
fprintf(stderr,
- "unexpected text in init_data.xml: %s\n", xp.parsed_tag
+ "%s: unexpected text in init_data.xml: %s\n",
+ time_to_string(dtime()), xp.parsed_tag
);
continue;
}
@@ -400,7 +404,9 @@ int parse_init_data_file(FILE* f, APP_INIT_DATA& ai) {
if (xp.parse_bool("vbox_window", ai.vbox_window)) continue;
xp.skip_unexpected(false, "parse_init_data_file");
}
- fprintf(stderr, "parse_init_data_file: no end tag\n");
+ fprintf(stderr, "%s: parse_init_data_file: no end tag\n",
+ time_to_string(dtime())
+ );
return ERR_XML_PARSE;
}
diff --git a/lib/coproc.h b/lib/coproc.h
index 3db9b22..941956c 100644
--- a/lib/coproc.h
+++ b/lib/coproc.h
@@ -142,6 +142,7 @@ struct PCI_INFO {
struct COPROC {
char type[256]; // must be unique
int count; // how many are present
+ bool is_gpu;
double peak_flops;
double used; // how many are in use (used by client)
bool have_cuda; // True if this GPU supports CUDA on this computer
@@ -197,6 +198,7 @@ struct COPROC {
// can't just memcpy() - trashes vtable
type[0] = 0;
count = 0;
+ is_gpu = false;
peak_flops = 0;
used = 0;
have_cuda = false;
@@ -284,6 +286,7 @@ struct COPROC_NVIDIA : public COPROC {
#endif
COPROC_NVIDIA(): COPROC() {
clear();
+ is_gpu = true;
}
void get(std::vector<std::string>& warnings);
void correlate(
@@ -321,6 +324,7 @@ struct COPROC_ATI : public COPROC {
#endif
COPROC_ATI(): COPROC() {
clear();
+ is_gpu = true;
}
void get(std::vector<std::string>& warnings);
void correlate(
@@ -345,6 +349,7 @@ struct COPROC_INTEL : public COPROC {
#endif
COPROC_INTEL(): COPROC() {
clear();
+ is_gpu = true;
}
void get(std::vector<std::string>& warnings);
void correlate(
diff --git a/lib/crypt.cpp b/lib/crypt.cpp
index d1a0e1b..208d925 100644
--- a/lib/crypt.cpp
+++ b/lib/crypt.cpp
@@ -52,6 +52,7 @@
#include "cert_sig.h"
#include "filesys.h"
#include "error_numbers.h"
+#include "util.h"
#include "crypt.h"
@@ -161,7 +162,10 @@ static int sscan_hex_data(const char* p, DATA_BLOCK& x) {
n = sscanf(p, "%2x", &m);
if (n <= 0) break;
if (nleft<=0) {
- fprintf(stderr, "sscan_hex_data: buffer overflow\n");
+ fprintf(stderr,
+ "%s: sscan_hex_data: buffer overflow\n",
+ time_to_string(dtime())
+ );
return ERR_BAD_HEX_FORMAT;
}
x.data[x.len++] = m;
@@ -349,7 +353,8 @@ int check_file_signature(
retval = decrypt_public(key, signature, clear_signature);
if (retval) {
fprintf(stderr,
- "check_file_signature: decrypt_public error %d\n", retval
+ "%s: check_file_signature: decrypt_public error %d\n",
+ time_to_string(dtime()), retval
);
return retval;
}
@@ -370,7 +375,9 @@ int check_file_signature2(
retval = sscan_key_hex(key_text, (KEY*)&key, sizeof(key));
if (retval) {
- fprintf(stderr, "check_file_signature2: sscan_key_hex failed\n");
+ fprintf(stderr, "%s: check_file_signature2: sscan_key_hex failed\n",
+ time_to_string(dtime())
+ );
return retval;
}
signature.data = signature_buf;
@@ -428,13 +435,16 @@ int read_key_file(const char* keyfile, R_RSA_PRIVATE_KEY& key) {
FCGI_FILE* fkey = FCGI::fopen(keyfile, "r");
#endif
if (!fkey) {
- fprintf(stderr, "can't open key file (%s)\n", keyfile);
+ fprintf(stderr,
+ "%s: can't open key file (%s)\n",
+ time_to_string(dtime()), keyfile
+ );
return ERR_FOPEN;
}
retval = scan_key_hex(fkey, (KEY*)&key, sizeof(key));
fclose(fkey);
if (retval) {
- fprintf(stderr, "can't parse key\n");
+ fprintf(stderr, "%s: can't parse key\n", time_to_string(dtime()));
return retval;
}
return 0;
@@ -544,7 +554,10 @@ int check_validity_of_cert(
X509_STORE_free(store);
if (retval != 1) {
- fprintf(stderr,"ERROR: Cannot verify certificate ('%s')\n", cFile);
+ fprintf(stderr,
+ "%s: ERROR: Cannot verify certificate ('%s')\n",
+ time_to_string(dtime()), cFile
+ );
return 0;
}
pubKey = X509_get_pubkey(cert);
@@ -573,7 +586,10 @@ int check_validity_of_cert(
BN_CTX_free(c);
}
if (pubKey->type == EVP_PKEY_DSA) {
- fprintf(stderr, "ERROR: DSA keys are not supported.\n");
+ fprintf(stderr,
+ "%s: ERROR: DSA keys are not supported.\n",
+ time_to_string(dtime())
+ );
return 0;
}
EVP_PKEY_free(pubKey);
diff --git a/lib/error_numbers.h b/lib/error_numbers.h
index e4c76c2..f6e3033 100644
--- a/lib/error_numbers.h
+++ b/lib/error_numbers.h
@@ -95,6 +95,7 @@
#define ERR_BENCHMARK_FAILED -133
#define ERR_BAD_HEX_FORMAT -134
// hex-format key data is bad
+#define ERR_GETADDRINFO -135
#define ERR_DB_NOT_FOUND -136
// no rows found in lookup() or enumerate()
#define ERR_DB_NOT_UNIQUE -137
diff --git a/lib/gui_rpc_client.cpp b/lib/gui_rpc_client.cpp
index 35d361d..a6c2a15 100644
--- a/lib/gui_rpc_client.cpp
+++ b/lib/gui_rpc_client.cpp
@@ -383,7 +383,9 @@ int RPC::parse_reply() {
return n;
}
if (parse_str(buf, "<error>", error_msg, sizeof(error_msg))) {
- fprintf(stderr, "RPC error: %s\n", error_msg);
+ fprintf(stderr, "%s: GUI RPC error: %s\n",
+ time_to_string(dtime()), error_msg
+ );
if (strstr(error_msg, "unauthorized")) return ERR_AUTHENTICATOR;
if (strstr(error_msg, "Missing authenticator")) return ERR_AUTHENTICATOR;
if (strstr(error_msg, "Missing URL")) return ERR_INVALID_URL;
diff --git a/lib/gui_rpc_client.h b/lib/gui_rpc_client.h
index e9c11b1..2004efd 100644
--- a/lib/gui_rpc_client.h
+++ b/lib/gui_rpc_client.h
@@ -578,6 +578,7 @@ struct ACCOUNT_IN {
std::string user_name;
std::string passwd;
std::string team_name;
+ bool ldap_auth;
ACCOUNT_IN();
~ACCOUNT_IN();
diff --git a/lib/gui_rpc_client_ops.cpp b/lib/gui_rpc_client_ops.cpp
index 63b8c82..228cd17 100644
--- a/lib/gui_rpc_client_ops.cpp
+++ b/lib/gui_rpc_client_ops.cpp
@@ -1346,6 +1346,7 @@ int PROJECT_CONFIG::parse(XML_PARSER& xp) {
platforms.push_back(msg);
continue;
}
+ if (xp.parse_bool("ldap_auth", ldap_auth)) continue;
}
return ERR_XML_PARSE;
}
@@ -1366,6 +1367,7 @@ void PROJECT_CONFIG::clear() {
sched_stopped = false;
web_stopped = false;
min_client_version = 0;
+ ldap_auth = false;
}
ACCOUNT_IN::ACCOUNT_IN() {
@@ -2305,23 +2307,25 @@ int RPC_CLIENT::lookup_account(ACCOUNT_IN& ai) {
RPC rpc(this);
string passwd_hash;
- if (strchr(ai.email_addr.c_str(), '@')) {
- downcase_string(ai.email_addr);
- passwd_hash = get_passwd_hash(ai.passwd, ai.email_addr);
- } else {
+ if (ai.ldap_auth && !strchr(ai.email_addr.c_str(), '@')) {
// LDAP case
//
passwd_hash = ai.passwd;
+ } else {
+ downcase_string(ai.email_addr);
+ passwd_hash = get_passwd_hash(ai.passwd, ai.email_addr);
}
snprintf(buf, sizeof(buf),
"<lookup_account>\n"
" <url>%s</url>\n"
" <email_addr>%s</email_addr>\n"
" <passwd_hash>%s</passwd_hash>\n"
+ " <ldap_auth>%d</ldap_auth>\n"
"</lookup_account>\n",
ai.url.c_str(),
ai.email_addr.c_str(),
- passwd_hash.c_str()
+ passwd_hash.c_str(),
+ ai.ldap_auth?1:0
);
buf[sizeof(buf)-1] = 0;
diff --git a/lib/network.cpp b/lib/network.cpp
index 2b156f0..a479270 100644
--- a/lib/network.cpp
+++ b/lib/network.cpp
@@ -39,6 +39,8 @@
#endif
#include "error_numbers.h"
+#include "str_util.h"
+#include "util.h"
#include "network.h"
@@ -163,8 +165,10 @@ int resolve_hostname(const char* hostname, sockaddr_storage &ip_addr) {
hints.ai_protocol = IPPROTO_TCP;
int retval = getaddrinfo(hostname, NULL, &hints, &res);
if (retval) {
- perror("getaddrinfo");
- return retval;
+ char buf[256];
+ sprintf(buf, "%s: getaddrinfo", time_to_string(dtime()));
+ perror(buf);
+ return ERR_GETADDRINFO;
}
struct addrinfo* aip = res;
while (aip) {
@@ -215,7 +219,9 @@ int resolve_hostname_or_ip_addr(
int boinc_socket(int& fd, int protocol) {
fd = (int)socket(protocol, SOCK_STREAM, 0);
if (fd < 0) {
- perror("socket");
+ char buf[256];
+ sprintf(buf, "%s: socket", time_to_string(dtime()));
+ perror("buf");
return ERR_SOCKET;
}
#ifndef _WIN32
diff --git a/lib/parse.cpp b/lib/parse.cpp
index 0e965e1..91b3a06 100644
--- a/lib/parse.cpp
+++ b/lib/parse.cpp
@@ -48,8 +48,9 @@
#endif
#include "error_numbers.h"
-#include "str_util.h"
#include "str_replace.h"
+#include "str_util.h"
+#include "util.h"
#include "parse.h"
@@ -834,8 +835,8 @@ void XML_PARSER::skip_unexpected(
if (verbose) {
fprintf(stderr,
- "Unrecognized XML tag '<%s>' in %s; skipping\n",
- start_tag, where
+ "%s: Unrecognized XML tag '<%s>' in %s; skipping\n",
+ time_to_string(dtime()), start_tag, where
);
}
if (strchr(start_tag, '/')) return;
diff --git a/lib/procinfo_mac.cpp b/lib/procinfo_mac.cpp
index e9ddec6..cfe05ec 100644
--- a/lib/procinfo_mac.cpp
+++ b/lib/procinfo_mac.cpp
@@ -51,7 +51,6 @@ int procinfo_setup(PROC_MAP& pm) {
int c, real_mem, virtual_mem, hours;
char* lf;
static long iBrandID = -1;
- int priority;
if (iBrandID < 0) {
iBrandID = BOINC_BRAND_ID;
@@ -105,7 +104,7 @@ int procinfo_setup(PROC_MAP& pm) {
// from a process that has the DYLD_LIBRARY_PATH environment variable set.
// "env -i command" prevents the command from inheriting the caller's
// environment, which avoids the spurious warning.
- fd = popen("env -i ps -axcopid,ppid,rss,vsz,pagein,pri,time,command", "r");
+ fd = popen("env -i ps -axcopid,ppid,rss,vsz,pagein,time,command", "r");
if (!fd) return ERR_FOPEN;
// Skip over the header line
@@ -119,13 +118,12 @@ int procinfo_setup(PROC_MAP& pm) {
while (1) {
p.clear();
- c = fscanf(fd, "%d%d%d%d%lu%d%d:%lf ",
+ c = fscanf(fd, "%d%d%d%d%lu%d:%lf ",
&p.id,
&p.parentid,
&real_mem,
&virtual_mem,
&p.page_fault_count,
- &priority,
&hours,
&p.user_time
);
@@ -142,7 +140,12 @@ int procinfo_setup(PROC_MAP& pm) {
// the client when the get_screensaver_tasks rpc is called, but that
// would not be 100% reliable for several reasons.
if (strcasestr(p.command, "screensaverengine")) p.is_boinc_app = true;
- p.is_low_priority = (priority <= 12);
+
+ // We do not mark Mac processes as low priority because some processes
+ // (e.g., Finder) change priority frequently, which would cause
+ // procinfo_non_boinc() and ACTIVE_TASK_SET::get_memory_usage() to get
+ // incorrect results for the % CPU used.
+ p.is_low_priority = false;
switch (iBrandID) {
case GRIDREPUBLIC_BRAND_ID:
diff --git a/lib/str_util.cpp b/lib/str_util.cpp
index fc75e53..54c97e5 100644
--- a/lib/str_util.cpp
+++ b/lib/str_util.cpp
@@ -441,6 +441,7 @@ const char* boincerror(int which_error) {
case ERR_GETRUSAGE: return "getrusage() failed";
case ERR_BENCHMARK_FAILED: return "benchmark failed";
case ERR_BAD_HEX_FORMAT: return "hex format key data bad";
+ case ERR_GETADDRINFO: return "getaddrinfo() failed";
case ERR_DB_NOT_FOUND: return "no database rows found in lookup/enumerate";
case ERR_DB_NOT_UNIQUE: return "database lookup not unique";
case ERR_DB_CANT_CONNECT: return "can't connect to database";
diff --git a/lib/util.cpp b/lib/util.cpp
index 5ec56a3..66c4f37 100644
--- a/lib/util.cpp
+++ b/lib/util.cpp
@@ -413,7 +413,10 @@ int run_program(
);
if (!retval) {
windows_format_error_string(GetLastError(), error_msg, sizeof(error_msg));
- fprintf(stderr, "CreateProcess failed: '%s'\n", error_msg);
+ fprintf(stderr,
+ "%s: CreateProcess failed: '%s'\n",
+ time_to_string(dtime()), error_msg
+ );
return -1; // CreateProcess returns 1 if successful, false if it failed.
}
diff --git a/lib/win_util.cpp b/lib/win_util.cpp
index 1916ce5..fe4b15f 100644
--- a/lib/win_util.cpp
+++ b/lib/win_util.cpp
@@ -121,7 +121,7 @@ void chdir_to_data_dir() {
if (lpszExpandedValue) free(lpszExpandedValue);
}
-std::wstring A2W(const std::string& str) {
+std::wstring boinc_ascii_to_wide(const std::string& str) {
int length_wide = MultiByteToWideChar(CP_ACP, 0, str.data(), -1, NULL, 0);
wchar_t *string_wide = static_cast<wchar_t*>(_alloca((length_wide * sizeof(wchar_t)) + sizeof(wchar_t)));
MultiByteToWideChar(CP_ACP, 0, str.data(), -1, string_wide, length_wide);
@@ -129,7 +129,7 @@ std::wstring A2W(const std::string& str) {
return result;
}
-std::string W2A(const std::wstring& str) {
+std::string boinc_wide_to_ascii(const std::wstring& str) {
int length_ansi = WideCharToMultiByte(CP_UTF8, 0, str.data(), -1, NULL, 0, NULL, NULL);
char* string_ansi = static_cast<char*>(_alloca(length_ansi + sizeof(char)));
WideCharToMultiByte(CP_UTF8, 0, str.data(), -1, string_ansi, length_ansi, NULL, NULL);
@@ -158,12 +158,8 @@ char* windows_format_error_string(
);
if (dwRet != 0) {
- // convert from current character encoding into UTF8
- std::string encoded_message = W2A(std::wstring(lpszTemp));
-
// include the hex error code as well
- snprintf(pszBuf, iSize, "%s (0x%x)", encoded_message.c_str(), dwError);
-
+ snprintf(pszBuf, iSize, "%S (0x%x)", lpszTemp, dwError);
if (lpszTemp) {
LocalFree((HLOCAL) lpszTemp);
}
diff --git a/lib/win_util.h b/lib/win_util.h
index 5c58f2f..4830a8b 100644
--- a/lib/win_util.h
+++ b/lib/win_util.h
@@ -21,8 +21,8 @@
extern BOOL TerminateProcessById(DWORD dwProcessId);
extern void chdir_to_data_dir();
-extern std::wstring A2W(const std::string& str);
-extern std::string W2A(const std::wstring& str);
+extern std::wstring boinc_ascii_to_wide(const std::string& str);
+extern std::string boinc_wide_to_ascii(const std::wstring& str);
extern char* windows_format_error_string(
unsigned long dwError, char* pszBuf, int iSize
diff --git a/sched/hr.cpp b/sched/hr.cpp
index e0fa6d5..910e26c 100644
--- a/sched/hr.cpp
+++ b/sched/hr.cpp
@@ -23,7 +23,7 @@
const int nocpu = 1;
const int Intel = 2;
const int AMD = 3;
-const int Macintosh = 4;
+const int Macintosh = 4; // PowerPC
const int AMDAthlon = 5;
const int AMDDuron = 6;
const int AMDSempron = 7;
diff --git a/sched/hr_info.h b/sched/hr_info.h
index cc62fdc..f8eed32 100644
--- a/sched/hr_info.h
+++ b/sched/hr_info.h
@@ -15,6 +15,13 @@
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
+// Used by the feeder to decide how many array slots
+// to allocate to various HR classes,
+// based on how much RAC is being generated by that class
+//
+// The RAC info is obtained by census.php,
+// which writes it to a file read by the feeder.
+
#ifndef _HR_INFO_
#define _HR_INFO_
diff --git a/version.log b/version.log
index 76ae95b..f794ca5 100644
--- a/version.log
+++ b/version.log
@@ -1 +1 @@
-7.4.27
+7.4.30
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-boinc/boinc.git
More information about the pkg-boinc-commits
mailing list