mirror of https://github.com/BOINC/boinc.git
client: fix parsing of finish file on Win; caused spurious messages
This commit is contained in:
parent
343e0c0081
commit
bb2f9339b4
|
@ -616,10 +616,10 @@ bool ACTIVE_TASK::finish_file_present() {
|
||||||
sprintf(path, "%s/%s", slot_dir, BOINC_FINISH_CALLED_FILE);
|
sprintf(path, "%s/%s", slot_dir, BOINC_FINISH_CALLED_FILE);
|
||||||
FILE* f = boinc_fopen(path, "r");
|
FILE* f = boinc_fopen(path, "r");
|
||||||
if (!f) return false;
|
if (!f) return false;
|
||||||
fgets(buf, sizeof(buf), f);
|
fgets(buf, sizeof(buf), f); // read (and discard) exit status
|
||||||
fgets(buf, sizeof(buf), f);
|
char* p = fgets(buf, sizeof(buf), f);
|
||||||
|
if (p && strlen(buf)) {
|
||||||
fgets(buf2, sizeof(buf2), f);
|
fgets(buf2, sizeof(buf2), f);
|
||||||
if (strlen(buf)) {
|
|
||||||
msg_printf(result->project,
|
msg_printf(result->project,
|
||||||
strstr(buf2, "notice")?MSG_USER_ALERT:MSG_INFO,
|
strstr(buf2, "notice")?MSG_USER_ALERT:MSG_INFO,
|
||||||
"Message from task: %s", buf
|
"Message from task: %s", buf
|
||||||
|
|
Loading…
Reference in New Issue