mirror of https://github.com/BOINC/boinc.git
parent
8dfb0cd633
commit
3b1f64ce1b
|
@ -45,6 +45,7 @@ OBJS = \
|
|||
prefs.o \
|
||||
scheduler_op.o \
|
||||
speed_stats.o \
|
||||
ss_logic.o \
|
||||
time_stats.o \
|
||||
../lib/app_ipc.o \
|
||||
../lib/filesys.o \
|
||||
|
|
|
@ -43,6 +43,7 @@ FILE_XFER::~FILE_XFER() {
|
|||
int FILE_XFER::init_download(FILE_INFO& file_info) {
|
||||
double f_size;
|
||||
|
||||
is_upload = false;
|
||||
fip = &file_info;
|
||||
get_pathname(fip, pathname);
|
||||
if (file_size(pathname, f_size)) {
|
||||
|
@ -64,6 +65,7 @@ int FILE_XFER::init_upload(FILE_INFO& file_info) {
|
|||
fip = &file_info;
|
||||
get_pathname(fip, pathname);
|
||||
|
||||
is_upload = true;
|
||||
if (file_info.upload_offset < 0) {
|
||||
bytes_xferred = 0;
|
||||
sprintf(header,
|
||||
|
@ -175,6 +177,7 @@ bool FILE_XFER_SET::poll() {
|
|||
unsigned int i;
|
||||
FILE_XFER* fxp;
|
||||
bool action = false;
|
||||
int retval;
|
||||
|
||||
for (i=0; i<file_xfers.size(); i++) {
|
||||
fxp = file_xfers[i];
|
||||
|
@ -184,17 +187,20 @@ bool FILE_XFER_SET::poll() {
|
|||
if (log_flags.file_xfer_debug) {
|
||||
printf("http op done; retval %d\n", fxp->http_op_retval);
|
||||
}
|
||||
if (fxp->http_op_retval == 0) {
|
||||
fxp->file_xfer_retval = fxp->parse_server_response(
|
||||
fxp->fip->upload_offset
|
||||
);
|
||||
fxp->file_xfer_retval = fxp->http_op_retval;
|
||||
if (fxp->file_xfer_retval == 0) {
|
||||
if (fxp->is_upload) {
|
||||
fxp->file_xfer_retval = fxp->parse_server_response(
|
||||
fxp->fip->upload_offset
|
||||
);
|
||||
}
|
||||
|
||||
// If this was a file size query, restart the transfer
|
||||
// using the remote file size information
|
||||
//
|
||||
if (fxp->file_size_query) {
|
||||
if (fxp->file_xfer_retval) {
|
||||
printf("ERROR: file upload returned %d\n", fxp->file_xfer_retval);
|
||||
printf("ERROR: file upload returned %d\n", retval);
|
||||
fxp->fip->upload_offset = -1;
|
||||
} else {
|
||||
remove(fxp);
|
||||
|
@ -213,8 +219,6 @@ bool FILE_XFER_SET::poll() {
|
|||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
fxp->file_xfer_retval = fxp->http_op_retval;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,6 +38,7 @@ public:
|
|||
char pathname[256];
|
||||
char header[4096];
|
||||
bool file_size_query;
|
||||
bool is_upload;
|
||||
|
||||
FILE_XFER();
|
||||
~FILE_XFER();
|
||||
|
|
|
@ -180,6 +180,9 @@ void get_host_disk_info( double &total_space, double &free_space ) {
|
|||
int get_host_info(HOST_INFO& host) {
|
||||
get_host_disk_info( host.d_total, host.d_free );
|
||||
|
||||
#ifdef linux
|
||||
parse_cpuinfo(host);
|
||||
#else
|
||||
#if HAVE_SYS_SYSCTL_H
|
||||
int mib[2], mem_size;
|
||||
size_t len;
|
||||
|
@ -196,10 +199,8 @@ int get_host_info(HOST_INFO& host) {
|
|||
len = sizeof(host.p_model);
|
||||
sysctl(mib, 2, &host.p_model, &len, NULL, 0);
|
||||
#endif
|
||||
|
||||
#ifdef linux
|
||||
parse_cpuinfo(host);
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(_SC_NPROCESSORS_ONLN)
|
||||
host.p_ncpus = sysconf(_SC_NPROCESSORS_ONLN);
|
||||
|
@ -259,7 +260,6 @@ int get_host_info(HOST_INFO& host) {
|
|||
host.m_swap = vm_info.t_vm;
|
||||
*/
|
||||
#else
|
||||
#error Need to specify a method to obtain swap space
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_SYS_SYSTEMINFO_H) && defined(SI_HW_SERIAL)
|
||||
|
|
|
@ -79,7 +79,7 @@ static void http_get_request_header(
|
|||
char offset_info[256];
|
||||
if (offset) sprintf( offset_info, "Range: bytes=%.0f-\015\012", offset );
|
||||
sprintf(buf,
|
||||
"GET %s HTTP/1.1\015\012"
|
||||
"GET %s HTTP/1.0\015\012"
|
||||
"User-Agent: BOINC client\015\012"
|
||||
"Host: %s:%d\015\012"
|
||||
"%s"
|
||||
|
@ -94,7 +94,7 @@ static void http_get_request_header(
|
|||
//
|
||||
static void http_head_request_header(char* buf, char* host, int port, char* file) {
|
||||
sprintf(buf,
|
||||
"HEAD %s HTTP/1.1\015\012"
|
||||
"HEAD %s HTTP/1.0\015\012"
|
||||
"User-Agent: BOINC client\015\012"
|
||||
"Host: %s:%d\015\012"
|
||||
"Connection: close\015\012"
|
||||
|
@ -115,7 +115,7 @@ static void http_post_request_header(
|
|||
"Pragma: no-cache\015\012"
|
||||
"Cache-Control: no-cache\015\012"
|
||||
"Host: %s:%d\015\012"
|
||||
//"Connection: close\015\012"
|
||||
"Connection: close\015\012"
|
||||
"Content-Type: application/octet-stream\015\012"
|
||||
"Content-Length: %d\015\012"
|
||||
"\015\012",
|
||||
|
|
|
@ -38,7 +38,9 @@
|
|||
#include "prefs.h"
|
||||
#include "util.h"
|
||||
|
||||
void quit_client(int);
|
||||
// dummies
|
||||
void create_curtain(){}
|
||||
void delete_curtain(){}
|
||||
|
||||
// Display a message to the user.
|
||||
// Depending on the priority, the message may be more or less obtrusive
|
||||
|
|
|
@ -10,6 +10,10 @@ a highly secure (e.g., a disconnected, physically secure) host.
|
|||
crypt_prog -genkey 1024 BOINC_KEY_DIR/upload_private BOINC_KEY_DIR/upload_public
|
||||
crypt_prog -genkey 1024 BOINC_KEY_DIR/code_sign_private BOINC_KEY_DIR/code_sign_public
|
||||
</pre>
|
||||
Or, in the test/ directory, run
|
||||
<pre>
|
||||
gen_keys.php
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
The program <b>lib/crypt_prog</b> can be used for several purposes:
|
||||
|
|
|
@ -132,15 +132,22 @@ int add_wu_to_reply(
|
|||
APP_VERSION* app_version;
|
||||
int retval;
|
||||
WORKUNIT wu2;
|
||||
char buf[256];
|
||||
|
||||
app = ss.lookup_app(wu.appid);
|
||||
if (!app) {
|
||||
write_log("Can't find app\n");
|
||||
sprintf(buf, "Can't find app w/ ID %d\n", wu.appid);
|
||||
write_log(buf);
|
||||
return -1;
|
||||
}
|
||||
app_version = ss.lookup_app_version(app->id, platform.id, app->min_version);
|
||||
if (!app_version) {
|
||||
write_log("Can't find app version\n");
|
||||
sprintf(buf,
|
||||
"Can't find app version: appid %d platformid %d min_version %d"\n,
|
||||
app->id, platform.id, app->min_version
|
||||
);
|
||||
|
||||
write_log(buf);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
#! /usr/local/bin/php
|
||||
<?php
|
||||
// Generate encryption keys
|
||||
|
||||
include_once("test.inc");
|
||||
|
||||
create_keys();
|
||||
|
||||
?>
|
|
@ -286,8 +286,8 @@ class Project {
|
|||
|
||||
$p = $app_version->platform;
|
||||
$x = "add app_version -db_name $this->db_name -app_name '$app->name' -platform_name $p->name -version $app_version->version -download_dir $this->project_dir/download -download_url $this->download_url -code_sign_keyfile $this->key_dir/code_sign_private -exec_dir $app_version->exec_dir -exec_files";
|
||||
for ($i=0; $i<sizeof($app_version->exec_names); $i++) {
|
||||
$x = $x." ".$app_version->exec_names[$i];
|
||||
for ($j=0; $j<sizeof($app_version->exec_names); $j++) {
|
||||
$x = $x." ".$app_version->exec_names[$j];
|
||||
}
|
||||
run_tool($x);
|
||||
}
|
||||
|
|
6
todo
6
todo
|
@ -19,9 +19,6 @@ BUGS (arranged from high to low priority)
|
|||
run_on_startup
|
||||
hangup_if_dialed
|
||||
- trim leading/trailing spaces from account ID (Win GUI)
|
||||
- astropulse wanted to display screensaver graphics when it wasn't supposed to,
|
||||
causing the screen to flicker wildly and uncontrollably until ap.exe was killed
|
||||
This happened on 98 and 2000. recreate using Display Properties, preview
|
||||
- I entered in a wrong URL - there was no obvious feedback that it wasn't correct.
|
||||
Messages showed up in the messages tab, but I was looking at the progress tab.
|
||||
Shouldn't the client expect something from the server? If it doesn't get it,
|
||||
|
@ -33,8 +30,7 @@ BUGS (arranged from high to low priority)
|
|||
- consider warning message during windows (and perhaps other platforms)
|
||||
install that checks to see if the BOINC directory already exists,
|
||||
and if so, should the user overwrite it? or upgrade it?
|
||||
- When previewing the screensaver (on Win98) I had the AP graphics already on on the
|
||||
desktop - the screensaver just shows a bouncing "B" icon. Should that happen?
|
||||
- Screensaver on win98 shows up as "boinc_ss" in the screensaver list. Should be "BOINC"
|
||||
- After running all night (on Win98) I shook the mouse to wake up the blank screen, and
|
||||
all I saw was the top half of the screen was solid gray, and the bottom half the
|
||||
bottom half of the astropulse graphics. They weren't moving. The computer was frozen.
|
||||
|
|
Loading…
Reference in New Issue