[boinc] 01/03: Imported Upstream version 7.2.33+dfsg
Gianfranco Costamagna
locutusofborg-guest at moszumanska.debian.org
Mon Nov 25 17:06:07 UTC 2013
This is an automated email from the git hooks/post-receive script.
locutusofborg-guest pushed a commit to annotated tag debian/7.2.33+dfsg-1
in repository boinc.
commit 954008bda9c4fe7f9685a9d6738bcda55e1842c7
Author: Gianfranco Costamagna <costamagnagianfranco at yahoo.it>
Date: Mon Nov 25 17:58:37 2013 +0100
Imported Upstream version 7.2.33+dfsg
---
client/client_state.cpp | 7 +++----
client/gui_rpc_server_ops.cpp | 22 ++++++++++------------
clientgui/BOINCInternetFSHandler.cpp | 14 +++-----------
configure.ac | 2 +-
lib/gui_rpc_client.cpp | 24 ++++++++++++++++++------
5 files changed, 35 insertions(+), 34 deletions(-)
diff --git a/client/client_state.cpp b/client/client_state.cpp
index 27fc79d..ab71748 100644
--- a/client/client_state.cpp
+++ b/client/client_state.cpp
@@ -38,6 +38,7 @@
#endif
#include "cpp.h"
+#include "version.h" // version numbers from autoconf
#include "error_numbers.h"
#include "filesys.h"
#include "parse.h"
@@ -318,10 +319,8 @@ int CLIENT_STATE::init() {
time_stats.start();
msg_printf(
- NULL, MSG_INFO, "Starting BOINC client version %d.%d.%d for %s%s",
- core_client_version.major,
- core_client_version.minor,
- core_client_version.release,
+ NULL, MSG_INFO, "Starting BOINC client version %s for %s%s",
+ BOINC_VERSION_STRING,
get_primary_platform(),
#ifdef _DEBUG
" (DEBUG)"
diff --git a/client/gui_rpc_server_ops.cpp b/client/gui_rpc_server_ops.cpp
index a441706..8c22ea4 100644
--- a/client/gui_rpc_server_ops.cpp
+++ b/client/gui_rpc_server_ops.cpp
@@ -1024,12 +1024,11 @@ static void handle_set_global_prefs_override(GUI_RPC_CONN& grc) {
retval = boinc_delete_file(GLOBAL_PREFS_OVERRIDE_FILE);
}
}
- grc.mfout.printf(
- "<set_global_prefs_override_reply>\n"
- " <status>%d</status>\n"
- "</set_global_prefs_override_reply>\n",
- retval
- );
+ if (retval) {
+ grc.mfout.printf("<status>%d</status>\n", retval);
+ } else {
+ grc.mfout.printf("<success/>\n");
+ }
}
static void handle_get_cc_config(GUI_RPC_CONN& grc) {
@@ -1074,12 +1073,11 @@ static void handle_set_cc_config(GUI_RPC_CONN& grc) {
retval = boinc_delete_file(CONFIG_FILE);
}
}
- grc.mfout.printf(
- "<set_cc_config_reply>\n"
- " <status>%d</status>\n"
- "</set_cc_config_reply>\n",
- retval
- );
+ if (retval) {
+ grc.mfout.printf("<status>%d</status>\n", retval);
+ } else {
+ grc.mfout.printf("<success/>\n");
+ }
}
static void handle_get_notices(GUI_RPC_CONN& grc) {
diff --git a/clientgui/BOINCInternetFSHandler.cpp b/clientgui/BOINCInternetFSHandler.cpp
index b6db910..f8d32c5 100644
--- a/clientgui/BOINCInternetFSHandler.cpp
+++ b/clientgui/BOINCInternetFSHandler.cpp
@@ -524,22 +524,14 @@ bool CBOINCInternetFSHandler::CanOpen(const wxString& location)
{
if (b_ShuttingDown) return false;
-#if 0
// Check to see if we support the download of the specified file type
// TODO: We'll need to revisit this policy after the next public release.
// Either wait for the wxWidgets 3.0 migration, or fix the async file
// download issue. Until then disable image file downloads.
//
- wxURI uri = wxURI(location);
- wxFileName file = wxFileName(uri.GetPath());
-
- if (file.GetExt() == wxT("gif")) return false;
- if (file.GetExt() == wxT("tif")) return false;
- if (file.GetExt() == wxT("jpg")) return false;
- if (file.GetExt() == wxT("png")) return false;
- if (file.GetExt() == wxT("tiff")) return false;
- if (file.GetExt() == wxT("jpeg")) return false;
-#endif
+
+ // Even handle cases where images do not have extensions.
+ return false;
// Regular check based on protocols
//
diff --git a/configure.ac b/configure.ac
index 6d758fb..5ff0883 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.2.28)
+AC_INIT(BOINC, 7.2.33)
AC_CONFIG_MACRO_DIR([m4])
LIBBOINC_VERSION=`echo ${PACKAGE_VERSION} | sed 's/\./:/g'`
AC_SUBST([LIBBOINC_VERSION])
diff --git a/lib/gui_rpc_client.cpp b/lib/gui_rpc_client.cpp
index fb9d9d0..69fa901 100644
--- a/lib/gui_rpc_client.cpp
+++ b/lib/gui_rpc_client.cpp
@@ -343,18 +343,30 @@ int RPC::do_rpc(const char* req) {
return 0;
}
+// parse an RPC reply, of the form
+//
+// <success/>
+// or
+// <error>error message</error>
+// or
+// <status>N</status>
+//
int RPC::parse_reply() {
char buf[256], error_msg[256];
+ int n;
while (fin.fgets(buf, 256)) {
+ if (strstr(buf, "<success")) return 0;
+ if (parse_int(buf, "<status>", n)) {
+ return n;
+ }
if (parse_str(buf, "<error>", error_msg, sizeof(error_msg))) {
fprintf(stderr, "RPC error: %s\n", error_msg);
- continue;
+ 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;
+ if (strstr(error_msg, "Already attached to project")) return ERR_ALREADY_ATTACHED;
+ return -1;
}
- if (strstr(buf, "unauthorized")) return ERR_AUTHENTICATOR;
- if (strstr(buf, "Missing authenticator")) return ERR_AUTHENTICATOR;
- if (strstr(buf, "Missing URL")) return ERR_INVALID_URL;
- if (strstr(buf, "Already attached to project")) return ERR_ALREADY_ATTACHED;
- if (strstr(buf, "success")) return 0;
}
return -1;
}
--
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