Commit 582942b8 authored by David Anderson's avatar David Anderson

*** empty log message ***

svn path=/trunk/boinc/; revision=11637
parent 7bce86f5
......@@ -31,7 +31,7 @@
// Copyright (c) 1996 - 2006, Daniel Stenberg, <daniel@haxx.se>.
//
//
// OpenSSL & SSLaey
// OpenSSL & SSLeay
// http://www.openssl.org/
// Source: http://www.openssl.org/
// Copyright (c) 1998-2005 The OpenSSL Project. All rights reserved.
......@@ -43,4 +43,4 @@
// Source: http://www.zlib.org
// Copyright (C) 1995-2004 Jean-loup Gailly and Mark Adler
//
//
\ No newline at end of file
//
......@@ -13180,3 +13180,29 @@ Rom 7 Dec 2006
clientgui/
SkinManager.cpp, .h
David 7 Dec 2006
- change sample_get_project_config.php so that it can be used
to get project status. Its reply will have
<sched_stopped>1</sched_stopped>
if the scheduler is disabled
(note: the project may have no work; no API tells you that)
<web_stopped>1</web_stopped>
if web access to the DB is disabled
(renamed project_is_stopped() to web_stopped() in util.inc;
some projects may need to update their home pages accordingly)
- core client: use vsnprintf() instead of vsprintf()
to protect against buffer overrun
COPYRIGHT
client/
cs_scheduler.C
html/
inc/
util.inc
xml.inc
user/
sample_get_project_config.phhp
sample_index.php
lib/
mfile.C
......@@ -1189,13 +1189,13 @@ int CLIENT_STATE::handle_scheduler_reply(
// update records for ack'ed results
//
for (i=0; i<sr.result_acks.size(); i++) {
RESULT* rp = lookup_result(project, sr.result_acks[i].name);
if (log_flags.sched_op_debug) {
msg_printf(0, MSG_INFO,
"[sched_op_debug] handle_scheduler_reply(): got ack for result %s\n",
sr.result_acks[i].name
);
}
RESULT* rp = lookup_result(project, sr.result_acks[i].name);
if (rp) {
rp->got_server_ack = true;
} else {
......
......@@ -25,7 +25,7 @@ function button_image($status) {
function status_string($status) {
if ($status==1) return "Offline";
if ($status==2) return "<font color=00aa00><b>Online</b></font>";
if ($status==7) return "Skype Me!";
if ($status==7) return "<font color=00aa00><b>Skype Me!</b></font>";
if ($status==3) return "Away";
if ($status==4) return "Not available";
if ($status==5) return "Do not disturb";
......
......@@ -73,14 +73,6 @@ $earth = array(
"cpn_logo_world_1.jpg"
),
array(
"Seasonal Attribution Project",
"http://attribution.cpdn.org/",
"Oxford University",
"Earth sciences",
"To determine the extent to which extreme weather events like the United Kingdom floods of Autumn 2000 are attributable to human-induced climate change. We invite you to download and run high-resolution model simulations of the world\'s climate on your own computer. By comparing the results of these simulations, half of which will include the effects of human-induced climate change, and half of which will not, we will investigate the possible impact of human activity on extreme weather risk. This project has fairly high computing requirements, including 1GB RAM.",
"cpn_logo_world_1.jpg"
),
),
);
$astro_phys_chem = array(
......
......@@ -9,7 +9,7 @@ require_once("../inc/translation.inc");
$generating_xml = false;
function db_init() {
if (project_is_stopped()) {
if (web_stopped()) {
page_head("Not available");
echo "This page requires database access.
Our database server is temporarily shut down for maintenance.
......@@ -458,9 +458,12 @@ function format_credit($x) {
return number_format($x, 2);
}
function project_is_stopped() {
if (file_exists("../../stop_web")) return true;
return false;
function web_stopped() {
return file_exists("../../stop_web");
}
function sched_stopped() {
return file_exists("../../stop_sched");
}
function user_links($user) {
......
......@@ -4,7 +4,7 @@ require_once("../inc/db.inc");
require_once("../inc/util.inc");
function db_init_xml() {
if (project_is_stopped()) {
if (web_stopped()) {
return -183;
}
$retval = db_init_aux();
......
......@@ -17,9 +17,10 @@ echo "<project_config>
<name>$long_name</name>
";
if (project_is_stopped()) {
if (web_stopped()) {
echo "
<error_num>-183</error_num>
<web_stopped>1</web_stopped>
";
} else {
if ($disable_account_creation || defined('INVITE_CODES')) {
......@@ -33,6 +34,11 @@ if (project_is_stopped()) {
echo " <forum_version>$forum_version</forum_version>\n";
}
}
if (sched_stopped()) {
echo "
<sched_stopped>1</sched_stopped>
";
}
echo "
</project_config>
";
......
......@@ -53,7 +53,7 @@ if ($caching) {
start_cache(INDEX_PAGE_TTL);
}
$stopped = project_is_stopped();
$stopped = web_stopped();
$rssname = PROJECT . " RSS 2.0" ;
$rsslink = URL_BASE . "rss_main.php";
......
......@@ -57,11 +57,17 @@ int MFILE::open(const char* path, const char* mode) {
return 0;
}
#define BUFSIZE 100000
int MFILE::vprintf(const char* format, va_list ap) {
char buf2[65536];
char buf2[BUFSIZE];
int n, k;
k = vsprintf(buf2, format, ap);
k = vsnprintf(buf2, BUFSIZE, format, ap);
if (k<1 || k>=BUFSIZE) {
fprintf(stderr, "ERROR: buffer too small in MFILE::vprintf()\n");
return -1;
}
n = (int)strlen(buf2);
buf = (char*)realloc(buf, len+n+1);
if (!buf) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment