mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=2653
This commit is contained in:
parent
6cfa688462
commit
c669422dbb
|
@ -20,8 +20,6 @@
|
|||
// The part of the BOINC app lib having to do with graphics.
|
||||
// This code is NOT linked into the core client.
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <afxwin.h>
|
||||
extern DWORD WINAPI win_graphics_event_loop( LPVOID duff );
|
||||
|
|
|
@ -132,6 +132,12 @@ int main(int argc, char **argv) {
|
|||
retval = boinc_init(standalone);
|
||||
if (retval) exit(retval);
|
||||
|
||||
// can't write to stderr until after boinc_init()
|
||||
//
|
||||
for (i=0; i<argc; i++) {
|
||||
fprintf(stderr, "APP: upper_case: argv[%d] is %s\n", i, argv[i]);
|
||||
}
|
||||
|
||||
#ifdef BOINC_APP_GRAPHICS
|
||||
strcpy(display_buf, "(none)\0");
|
||||
retval = boinc_init_opengl();
|
||||
|
@ -187,7 +193,7 @@ int main(int argc, char **argv) {
|
|||
if (cpu_time) {
|
||||
n = 0;
|
||||
j = 3.14159;
|
||||
for (i=0; i<200000; i++) {
|
||||
for(i=0; i<20000000; i++) {
|
||||
n++;
|
||||
j *= n+j-3.14159;
|
||||
j /= (float)n;
|
||||
|
@ -206,7 +212,7 @@ int main(int argc, char **argv) {
|
|||
}
|
||||
#endif
|
||||
if (random_exit) {
|
||||
if ((random()%20) == 0) {
|
||||
if (drand() < 0.05) {
|
||||
exit(-10);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7622,3 +7622,24 @@ Karl 2003-11-07
|
|||
|
||||
client/win
|
||||
wingui_mainwindow.cpp
|
||||
|
||||
David 9 Nov 2003
|
||||
- change upper_case app so that -cpu_time actually uses
|
||||
significant CPU time (36 secs on my laptop)
|
||||
- core state file writes sometimes fail if another app (e.g. text editor)
|
||||
has the file open. Show error code.
|
||||
- don't start a scheduler RPC if we're suspended
|
||||
- don't show parse error messages for empty lines in scheduler reply
|
||||
- if reset a project during a scheduler RPC, set the scheduler_op state
|
||||
to IDLE (else will never do another RPC)
|
||||
|
||||
api/
|
||||
graphics_api.C
|
||||
apps/
|
||||
upper_case.C
|
||||
client/
|
||||
client_state.C
|
||||
cs_scheduler.C
|
||||
scheduler_op.C
|
||||
lib/
|
||||
filesys.C
|
||||
|
|
|
@ -298,7 +298,7 @@ int CLIENT_STATE::net_sleep(double x) {
|
|||
// (in which case should call this again immediately)
|
||||
//
|
||||
bool CLIENT_STATE::do_something() {
|
||||
int actions = 0, reason;
|
||||
int actions = 0, reason, retval;
|
||||
ScopeMessages scope_messages(log_messages, ClientMessages::DEBUG_POLL);
|
||||
|
||||
check_suspend_activities(reason);
|
||||
|
@ -347,8 +347,9 @@ bool CLIENT_STATE::do_something() {
|
|||
POLL_ACTION(update_results , update_results );
|
||||
}
|
||||
|
||||
if (write_state_file_if_needed()) {
|
||||
msg_printf(NULL, MSG_ERROR, "Couldn't write state file");
|
||||
retval = write_state_file_if_needed();
|
||||
if (retval) {
|
||||
msg_printf(NULL, MSG_ERROR, "Couldn't write state file: %d", retval);
|
||||
}
|
||||
--log_messages;
|
||||
scope_messages.printf(
|
||||
|
@ -988,6 +989,7 @@ int CLIENT_STATE::reset_project(PROJECT* project) {
|
|||
&& scheduler_op->project == project
|
||||
) {
|
||||
http_ops->remove(&scheduler_op->http_op);
|
||||
scheduler_op->state = SCHEDULER_OP_STATE_IDLE;
|
||||
}
|
||||
|
||||
// mark results as server-acked.
|
||||
|
|
|
@ -342,6 +342,7 @@ bool CLIENT_STATE::scheduler_rpc_poll() {
|
|||
|
||||
switch(scheduler_op->state) {
|
||||
case SCHEDULER_OP_STATE_IDLE:
|
||||
if (activities_suspended) break;
|
||||
if (exit_when_idle && contacted_sched_server) {
|
||||
should_get_work = false;
|
||||
} else {
|
||||
|
|
|
@ -646,7 +646,7 @@ int SCHEDULER_REPLY::parse(FILE* in, PROJECT* project) {
|
|||
} else if (parse_str(buf, "<message", message, sizeof(message))) {
|
||||
parse_attr(buf, "priority", message_priority, sizeof(message_priority));
|
||||
continue;
|
||||
} else {
|
||||
} else if (strlen(buf)>1){
|
||||
msg_printf(project, MSG_ERROR, "SCHEDULER_REPLY::parse(): unrecognized %s\n", buf);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -77,7 +77,7 @@ int is_file(char* path) {
|
|||
return sbuf.st_mode & S_IFREG;
|
||||
}
|
||||
|
||||
int is_dir(char* path) {
|
||||
int is_dir(const char* path) {
|
||||
struct stat sbuf;
|
||||
memset(&sbuf, 0, sizeof(struct stat));
|
||||
stat(path, &sbuf);
|
||||
|
|
Loading…
Reference in New Issue