From 3b363f9a87301dbefd81071210ddeb072f6f2153 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Mon, 30 Apr 2012 18:46:50 +0000 Subject: [PATCH] - web RPC: include rpc_time in XML host description - client: if acct mgr sends us an account with no authenticator, show an error message instead of trying to attach svn path=/trunk/boinc/; revision=25608 --- checkin_notes | 13 +++++++++++++ client/acct_mgr.cpp | 8 ++++++++ html/inc/xml.inc | 5 +++++ html/user/show_user.php | 2 -- 4 files changed, 26 insertions(+), 2 deletions(-) diff --git a/checkin_notes b/checkin_notes index c4a9572ffa..cfde7318d9 100644 --- a/checkin_notes +++ b/checkin_notes @@ -3632,3 +3632,16 @@ Rom 27 Apr 2012 clientscr/ screensaver_win.cpp, .h + +David 30 Apr 2012 + - web RPC: include rpc_time in XML host description + - client: if acct mgr sends us an account with no authenticator, + show an error message instead of trying to attach + + html/ + inc/ + xml.inc + user/ + show_user.php + client/ + acct_mgr.cpp diff --git a/client/acct_mgr.cpp b/client/acct_mgr.cpp index a92e8f10fb..48c6490aab 100644 --- a/client/acct_mgr.cpp +++ b/client/acct_mgr.cpp @@ -589,6 +589,14 @@ void ACCT_MGR_OP::handle_reply(int http_op_retval) { } } } else { + if (acct.authenticator.empty()) { + msg_printf(NULL, MSG_INFO, + "Account manager reply missing authenticator for %s", + acct.url.c_str() + ); + continue; + } + // here we don't already have the project. // Attach to it, unless the acct mgr is telling us to detach // diff --git a/html/inc/xml.inc b/html/inc/xml.inc index 802966bc10..423e6dcef6 100644 --- a/html/inc/xml.inc +++ b/html/inc/xml.inc @@ -35,11 +35,14 @@ function xml_header() { $generating_xml = true; } +// used only if host owner is the requesting user +// function show_host_xml($host) { echo " $host->id $host->create_time $host->rpc_seqno + $host->rpc_time $host->host_cpid $host->total_credit $host->expavg_credit @@ -60,6 +63,8 @@ function show_host_xml($host) { "; } +// $show_hosts is true only if $user is the logged-in user +// function show_user_xml($user, $show_hosts) { $cpid = md5($user->cross_project_id.$user->email_addr); echo " diff --git a/html/user/show_user.php b/html/user/show_user.php index 4d3e937570..77d915e87b 100644 --- a/html/user/show_user.php +++ b/html/user/show_user.php @@ -33,8 +33,6 @@ require_once("../inc/user.inc"); require_once("../inc/forum.inc"); require_once("../project/project.inc"); -//check_get_args(array("auth", "userid", "format")); - $auth = get_str("auth", true); if (!$auth) { $id = get_int("userid");