exit_before_upload flag

svn path=/trunk/boinc/; revision=1119
This commit is contained in:
David Anderson 2003-03-31 23:18:55 +00:00
parent 928ea8391b
commit b9e2c0e49f
5 changed files with 20 additions and 1 deletions

View File

@ -3956,3 +3956,14 @@ David Mar 25 2003
html_user/ html_user/
create_account* create_account*
util.inc util.inc
David Mar 31 2003
- add "-exit_before_upload" cmdline option
client/
client_state.C,h
pers_file_xfer.C
html_user/
team_create_action.php
test/
test_uc.php

View File

@ -76,6 +76,7 @@ CLIENT_STATE::CLIENT_STATE() {
platform_name = HOST; platform_name = HOST;
exit_after_app_start_secs = 0; exit_after_app_start_secs = 0;
app_started = 0; app_started = 0;
exit_before_upload = false;
user_idle = true; user_idle = true;
use_http_proxy = false; use_http_proxy = false;
use_socks_proxy = false; use_socks_proxy = false;
@ -1291,6 +1292,8 @@ void CLIENT_STATE::parse_cmdline(int argc, char** argv) {
global_prefs.run_minimized = true; global_prefs.run_minimized = true;
} else if (!strcmp(argv[i], "-saver")) { } else if (!strcmp(argv[i], "-saver")) {
start_saver = true; start_saver = true;
} else if (!strcmp(argv[i], "-exit_before_upload")) {
exit_before_upload = true;
// the above options are private (i.e. not shown by -help) // the above options are private (i.e. not shown by -help)

View File

@ -104,6 +104,8 @@ public:
char socks_user_passwd[256]; char socks_user_passwd[256];
char host_venue[256]; // venue, as reported by project that sent us char host_venue[256]; // venue, as reported by project that sent us
// most recent global prefs // most recent global prefs
bool exit_before_upload;
// exit when about to upload a file
private: private:
bool client_state_dirty; bool client_state_dirty;

View File

@ -88,6 +88,9 @@ bool PERS_FILE_XFER::start_xfer() {
file_xfer->proxy_server_port = gstate.proxy_server_port; file_xfer->proxy_server_port = gstate.proxy_server_port;
} }
if (is_upload) { if (is_upload) {
if (gstate.exit_before_upload) {
exit(0);
}
retval = file_xfer->init_upload(*fip); retval = file_xfer->init_upload(*fip);
} else { } else {
retval = file_xfer->init_download(*fip); retval = file_xfer->init_download(*fip);

View File

@ -29,7 +29,7 @@
$result = mysql_query($query); $result = mysql_query($query);
if ($result) { if ($result) {
$teamid = mysql_insert_id(); $teamid = mysql_insert_id();
Header("Location: team_display.php?teamid=$teamid); Header("Location: team_display.php?teamid=$teamid");
} else { } else {
page_head("Error"); page_head("Error");
echo "Couldn't create team - please try later.<br>\n"; echo "Couldn't create team - please try later.<br>\n";