summaryrefslogtreecommitdiff
path: root/src/where.c
diff options
context:
space:
mode:
authorfergus.henderson <fergushenderson@users.noreply.github.com>2010-10-08 18:29:16 +0000
committerfergus.henderson <fergushenderson@users.noreply.github.com>2010-10-08 18:29:16 +0000
commitefb9527370a0e14c41017ec831955ad779cac3ad (patch)
treef88c95ba9ad902a42463a28598f30f392ef45243 /src/where.c
parentf6dba9bbc0a23518591c7cd63764a7f5dcbc6a69 (diff)
downloaddistcc-git-efb9527370a0e14c41017ec831955ad779cac3ad.tar.gz
Apply patch from Jeremy Murphy <jeremy.william.murphy@gmail.com>,
tested and reviewed by cheepero@gmail.com, to address <http://code.google.com/p/distcc/issues/detail?id=36> "distcc-mon-gnome displays multiple rows for same host/slot".
Diffstat (limited to 'src/where.c')
-rw-r--r--src/where.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/where.c b/src/where.c
index b0cd6be..6e4c5dd 100644
--- a/src/where.c
+++ b/src/where.c
@@ -124,7 +124,9 @@ static void dcc_lock_pause(void)
unsigned pause_time = 1;
- dcc_note_state(DCC_PHASE_BLOCKED, NULL, NULL);
+ /* This call to dcc_note_state() is made before the host is known, so it
+ does not make sense and does nothing useful as far as I can tell. */
+ /* dcc_note_state(DCC_PHASE_BLOCKED, NULL, NULL, DCC_UNKNOWN); */
rs_trace("nothing available, sleeping %us...", pause_time);
@@ -159,7 +161,7 @@ static int dcc_lock_one(struct dcc_hostdef *hostlist,
if (ret == 0) {
*buildhost = h;
- dcc_note_state_slot(i_cpu);
+ dcc_note_state_slot(i_cpu, strcmp(h->hostname, "localhost") == 0 ? DCC_LOCAL : DCC_REMOTE);
return 0;
} else if (ret == EXIT_BUSY) {
continue;
@@ -192,6 +194,6 @@ int dcc_lock_local_cpp(int *cpu_lock_fd)
int ret;
struct dcc_hostdef *chosen;
ret = dcc_lock_one(dcc_hostdef_local_cpp, &chosen, cpu_lock_fd);
- dcc_note_state(DCC_PHASE_CPP, NULL, chosen->hostname);
+ dcc_note_state(DCC_PHASE_CPP, NULL, chosen->hostname, DCC_LOCAL);
return ret;
}