*** empty log message ***

svn path=/trunk/boinc/; revision=5474
This commit is contained in:
David Anderson 2005-02-18 16:52:46 +00:00
parent 252b167955
commit 7736082ca6
6 changed files with 75 additions and 36 deletions

View File

@ -23392,7 +23392,7 @@ David 28 Jan 2005
time_stats.C,h
David 28 Jan 2005
- add notion of CONNECTED_STATE;
- core client: add notion of CONNECTED_STATE;
can be CONNECTED, NOT_CONNECTED, or UNKNOWN.
Implemented get_connected_state() on Windows
- if connected state is UNKNOWN,
@ -24999,3 +24999,11 @@ Rom 17 Feb 2005
client/
http.C
David 18 Feb 2005
- core client HTTP: in a POST operation (i.e. scheduler RPC)
when start to read reply body,
reset bytes_xferred and file_offset to zero
(otherwise length calculation at the end will fail)
client/
http.C,h

View File

@ -385,7 +385,9 @@ int HTTP_OP::init_head(const char* url) {
// Initialize HTTP GET operation
//
int HTTP_OP::init_get(const char* url, const char* out, bool del_old_file, double off) {
int HTTP_OP::init_get(
const char* url, const char* out, bool del_old_file, double off
) {
char proxy_buf[256];
if (del_old_file) {
@ -407,7 +409,9 @@ int HTTP_OP::init_get(const char* url, const char* out, bool del_old_file, doubl
sprintf(proxy_buf, "/%s", filename);
}
if (!pi.use_http_auth) {
http_get_request_header(request_header, url_hostname, port, proxy_buf, (int)file_offset);
http_get_request_header(
request_header, url_hostname, port, proxy_buf, (int)file_offset
);
} else {
char id_passwd[512];
string encstr = "";
@ -779,8 +783,11 @@ bool HTTP_OP_SET::poll(double) {
case HTTP_OP_POST:
retval = unlink(htp->outfile);
// no error check here because file need not already exist
//
bytes_xferred = 0;
file_offset = 0;
// fall through
//
case HTTP_OP_GET:
htp->http_op_state = HTTP_STATE_REPLY_BODY;
@ -823,9 +830,9 @@ bool HTTP_OP_SET::poll(double) {
scope_messages.printf("HTTP_OP_SET::poll(): got reply body\n");
htp->http_op_retval = 0;
if (htp->hrh.content_length) {
if ((htp->bytes_xferred-htp->file_offset) != htp->hrh.content_length) {
if ((htp->bytes_xferred - htp->file_offset) != htp->hrh.content_length) {
scope_messages.printf(
"HTTP_OP_SET::poll(): ERR_IO: bytes transfred: %d,"
"HTTP_OP_SET::poll(): ERR_IO: bytes_xferred: %d,"
"file offset: %d, expected content length: %d\n",
htp->bytes_xferred, htp->file_offset, htp->hrh.content_length
);

View File

@ -48,15 +48,17 @@ struct HTTP_REPLY_HEADER {
};
#define HTTP_OP_NONE 0
// For the first 4, data source/sink are files
#define HTTP_OP_GET 1
// data sink is a file (used for file download)
#define HTTP_OP_POST 2
// data source and sink are files (used for scheduler op)
#define HTTP_OP_HEAD 4
// no data (used for file upload)
#define HTTP_OP_POST2 5
// a POST operation where the request comes from a combination
// of a string and a file w/offset,
// and the reply goes into a memory buffer
// Used exclusively for file upload
// and the reply goes into a memory buffer.
// Used for file upload
class HTTP_OP : public PROXY {
public:

View File

@ -163,6 +163,13 @@ or (Redhat) go to System Settings/Add Software.
Notes for <a href=debian_linux_install.txt>Debian Linux</a>.
</ul>
<h3>Apache notes</h3>
<p>
Make sure httpd.conf sets the default MIME type as follows:
<pre>
DefaultType application/octet-stream
</pre>
<hr>
<h2>Windows</h2>

View File

@ -118,6 +118,11 @@ To make source distributions:
gmake dist
</pre>
<h2>Strict warning</h2>
To compile BOINC with strict compiler warnings, use
<pre>
./configure -CXXFLAGS=\"-Wall -W -Wmissing-prototypes -Wstrict-prototypes -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -fno-common -Wnested-externs\"
</pre>
";
page_tail();
?>

View File

@ -3,17 +3,14 @@ require_once("docutil.php");
page_head("The make_project script");
echo "
<p>
BOINC provides a script for setting up a BOINC project.
This has been tested only on Linux and Solaris hosts;
it may work with small modifications on Windows also.
BOINC provides a script <code>make_project</code>
for creating the server components of a BOINC project.
It has been tested on Linux and Solaris.
<h3>Creating the server</h3>
<p>
First, install all components listed in the
<a href=build.php>Software Prerequisites</a> page.
<p>
Run the <code>make_project</code> script.
Then run the <code>make_project</code> script.
For example:
<pre>
cd tools/
@ -23,24 +20,13 @@ creates a project with master URL
http://&lt;hostname>/cplan/
whose directory structure is rooted at
\$HOME/projects/cplan.
<pre>
cd tools/
./make_project --base \$HOME/boinc --url_base http://boink/ cplan 'Cunning Plan'
</pre>
creates a project with master URL
http://boink/cplan/ and long name <b>Cunning Plan</b>,
rooted at \$HOME/boinc/projects/cplan.
<p>
See 'make_project --help' for more command-line options available (such as
finer control of directory structure or clobbering an existing installation).
<p>
The script does the following:
More specifically, <code>make_project</code> does the following:
<ul>
<li> Create the project directory and its subdirectories.
<li> Create the project's encryption keys if necessary.
NOTE: before making the project publicly visible,
NOTE: before making the project visible to the public,
you must move the code-signing private key
to a highly secure (preferably non-networked) host,
and delete it from the server host.
@ -57,16 +43,40 @@ into /etc/apache/httpd.conf (path varies), or Include directly.
<li>It generates a crontab line to paste.
</ul>
The PHP scripts need access to the database,
so the user that Apache runs under needs SELECT,INSERT,UPDATE,DELETE
to the database just created.
<p>
You should also make sure httpd.conf sets the default MIME type as follows:
The command-line syntax is as follows:
<pre>
DefaultType application/octet-stream
make_project [options] project_name [ 'Project Long Name ' ]
</pre>
Options are:
";
list_start();
list_bar("directory options");
list_item("--project_root",
"Project root directory path. Default: \$HOME/projects/PROJECT_NAME"
);
list_item("--key_dir", "Where keys are stored. Default: PROJECT_ROOT/keys");
list_item("--url_base", "Determines master URL Default: http://\$NODENAME/");
list_item("--no_query", "Accept all directories without querying");
list_item("--delete_prev_inst", "Delete project-root first (from prev installation)");
list_bar("URL options");
list_item("--html_user_url", "User URL. Default: URL_BASE/PROJECT/");
list_item("--html_ops_url", "Admin URL. Default: URL_BASE/PROJECT_ops/");
list_item("--cgi_url", "CGI URL. Default: URL_BASE/PROJECT_cgi/");
list_bar("database options");
list_item("--db_host", "Database host. Default: none (this host)");
list_item("--db_name", "Database name. Default: PROJECT");
list_item("--db_user", "Database user. Default: this user");
list_item("--db_passwd", "Database password. Default: None");
list_item("--drop_db_first", "Drop database first (from prev installation)");
list_bar("debugging options");
list_item("--verbose={0,1,2}", "default: 1");
list_item("-v", "alias for --verbose=2");
list_item("-h or --help", "Show options");
list_end();
page_tail();
?>