no message

svn path=/trunk/boinc/; revision=1178
This commit is contained in:
Dan Werthimer 2003-05-09 22:44:35 +00:00
parent 61890e3d8e
commit 8dfb0cd633
5 changed files with 22 additions and 8 deletions

View File

@ -86,6 +86,7 @@ public:
#endif
unsigned int cpu_benchmarks_start;
int check_cpu_benchmarks();
void trunc_stderr_stdout();
int project_disk_usage(PROJECT*, double&);
int current_disk_usage(double&);
// returns the total disk usage of BOINC on this host

View File

@ -37,6 +37,7 @@
#include "client_types.h"
#include "log_flags.h"
#include "client_state.h"
#include "filesys.h"
#include "error_numbers.h"
// Decide whether to consider starting a new file transfer
@ -46,6 +47,20 @@ bool CLIENT_STATE::start_new_file_xfer() {
return true;
}
void CLIENT_STATE::trunc_stderr_stdout() {
double f_size;
// If the stderr.txt or stdout.txt files are too big, reset them
// TODO: should we tell the user we're resetting these?
file_size(STDERR_FILE_NAME, f_size);
if (f_size > MAX_STDERR_FILE_SIZE) {
freopen(STDERR_FILE_NAME, "w", stderr);
}
file_size(STDOUT_FILE_NAME, f_size);
if (f_size > MAX_STDOUT_FILE_SIZE) {
freopen(STDOUT_FILE_NAME, "w", stderr);
}
}
// Make a directory for each of the projects in the client state
//

View File

@ -39,6 +39,9 @@ extern void get_account_filename(char* master_url, char* path);
extern bool is_account_file(char*);
extern void escape_project_url(char *in, char* out);
#define MAX_STDERR_FILE_SIZE 1024*1024
#define MAX_STDOUT_FILE_SIZE 1024*1024
#define PROJECTS_DIR "projects"
#define SLOTS_DIR "slots"
#define STATE_FILE_TEMP "state_file_temp.xml"

View File

@ -1643,6 +1643,8 @@ void CMainWindow::OnTimer(UINT uEventID)
UpdateGUI(&gstate);
}
gstate.trunc_stderr_stdout();
// Start the timer again
m_nGuiTimerID = SetTimer(GUI_TIMER, GUI_WAIT, (TIMERPROC) NULL);
}

9
todo
View File

@ -8,12 +8,10 @@ BUGS (arranged from high to low priority)
- Result status should say "downloading files", "uploading files", etc.
- message window should reposition to bottom when new message
- show_message should expect \n, discard it if GUI
- show "---" for CPU time, %done of results not started yet
- Win GUI: line between menus and tabs
- "show graphics" should not use right-click
- win GUI: reduce flicker?
- on major version change,
should discard any pending WUs
- on major version change, should discard any pending WUs
- labels on disk graph are not clear
- document and add to global prefs?
start_saver
@ -91,11 +89,6 @@ implement a "fetch prefs" command (regular RPC w/o work request)
all RPCs should return a "user-specific project URL"
to be used in GUI (might refer to user page)
screensaver should say (in text below logo) if
- core client isn't running
- core client running, but in no-work period
- in work period, but no app w/ graphics to run
when you create a team you should join that team
in GUI, project name should hyperlink to a project-specified URL