Skip to content

Commit e92f991

Browse files
boinccmd: --get_state and --get_simple_gui_info show same task info
1 parent 95ff0e5 commit e92f991

2 files changed

Lines changed: 12 additions & 5 deletions

File tree

lib/gui_rpc_client_ops.cpp

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1595,16 +1595,24 @@ int RPC_CLIENT::get_simple_gui_info(SIMPLE_GUI_INFO& info) {
15951595
retval = rpc.do_rpc("<get_simple_gui_info/>\n");
15961596
if (!retval) {
15971597
while (rpc.fin.fgets(buf, 256)) {
1598-
if (match_tag(buf, "</simple_gui_info>")) break;
1599-
else if (match_tag(buf, "<project>")) {
1598+
if (match_tag(buf, "</simple_gui_info>")) {
1599+
break;
1600+
}
1601+
if (match_tag(buf, "<project>")) {
16001602
PROJECT* project = new PROJECT();
16011603
project->parse(rpc.xp);
16021604
info.projects.push_back(project);
16031605
continue;
16041606
}
1605-
else if (match_tag(buf, "<result>")) {
1607+
if (match_tag(buf, "<result>")) {
16061608
RESULT* result = new RESULT();
16071609
result->parse(rpc.xp);
1610+
for (PROJECT *p: info.projects) {
1611+
if (!strcmp(p->master_url, result->project_url)) {
1612+
result->project = p;
1613+
break;
1614+
}
1615+
}
16081616
info.results.push_back(result);
16091617
continue;
16101618
}

lib/gui_rpc_client_print.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,8 @@ void RESULT::print() {
150150
printf(" WU name: %s\n", wu_name);
151151
if (project) {
152152
printf(" project: %s\n", project->project_name.c_str());
153-
} else {
154-
printf(" project URL: %s\n", project_url);
155153
}
154+
printf(" project URL: %s\n", project_url);
156155
time_t foo = (time_t)received_time;
157156
printf(" received: %s", ctime(&foo));
158157
foo = (time_t)report_deadline;

0 commit comments

Comments
 (0)