- client: if bind fails, print port#

- web: don't randomize order of profiles
    (fixes checkin of 28 Oct)

svn path=/trunk/boinc/; revision=16520
This commit is contained in:
David Anderson 2008-11-18 17:33:13 +00:00
parent b39c613916
commit 9967112f60
6 changed files with 49 additions and 5 deletions

View File

@ -9486,3 +9486,13 @@ Charlie 18 Nov 08
MainDocument.cpp, .h
mac/
MacSysMenu.cpp
David 18 Nov 2008
- client: if bind fails, print port#
- web: don't randomize order of profiles
(fixes checkin of 28 Oct)
client/
gui_rpc_server.cpp
html/ops/
update_profile_pages.php

View File

@ -245,7 +245,7 @@ int GUI_RPC_CONN_SET::init(bool last_time) {
#endif
if (last_time) {
msg_printf(NULL, MSG_INTERNAL_ERROR,
"GUI RPC bind failed: %d", retval
"GUI RPC bind to port %d failed: %d", addr.sin_port, retval
);
}
boinc_close_socket(lsock);

View File

@ -8,6 +8,11 @@ require_once("poll_data.inc");
page_head(tr(POLL_TITLE));
echo "The BOINC poll is closed. See results
<a href=poll_results.php>here</a>.";
page_tail();
exit;
echo "
<body onload=\"disable_all();\">
<p>

View File

@ -4,6 +4,7 @@ require_once("poll.inc");
require_once("translation.inc");
require_once("poll_data.inc");
error_page("The poll is closed");
function error() {
page_head(tr(POLL_ERROR_TITLE));
echo tr(POLL_ERROR_TEXT);

View File

@ -15,6 +15,7 @@ if (file_exists($cachefile)) {
}
}
set_time_limit(0);
ini_set("memory_limit", "2048M");
ob_start();
ob_implicit_flush(0);
@ -26,6 +27,20 @@ mysql_select_db("poll");
$last_time = 0;
function parse_xml2($resp, &$sums) {
$x = array();
$xml = $resp->xml;
$lines = explode("\n", $xml);
foreach ($lines as $line) {
$matches = array();
$retval = ereg('<([^>]*)>([^<]*)', $line, $matches);
$tag = $matches[1];
$val = $matches[2];
$x[$tag] = $val;
}
return $x;
}
function parse_xml($resp, &$sums) {
global $last_time;
$xml = $resp->xml;
@ -163,7 +178,18 @@ $sums = array();
$result = mysql_query("select * from response order by update_time");
while ($resp = mysql_fetch_object($result)) {
parse_xml($resp, $sums);
if (0) {
$x = parse_xml2($resp, $sums);
if ($x['fother_text'] == "") continue;
if ($x['wother_text'] == "") continue;
if ($x['nother_text'] == "") continue;
if ($x['cother_text'] == "") continue;
if ($x['vother_text'] == "") continue;
echo "deleting $resp->uid\n";
mysql_query("delete from response where uid='$resp->uid'");
}
}
//exit;
//print_r($sums);
page_head(tr(POLL_RESULTS_TITLE));

View File

@ -153,10 +153,12 @@ function build_picture_pages($width, $height) {
mysql_free_result($result);
if (count($userIds) > 0) {
// Randomize the ordering of users.
shuffle($userIds);
}
// don't randomize; makes things hard for people who sift profiles
//
// if (count($userIds) > 0) {
// // Randomize the ordering of users.
// shuffle($userIds);
// }
$numPages = ceil(count($userIds)/($width * $height));