summaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-04-13 01:09:10 +0100
committerCarl Hetherington <cth@carlh.net>2018-04-13 01:09:10 +0100
commit9106e6ed551b13e1b7c7ee2088d54ce0ae430bcf (patch)
treeb147172aa469005bdd7c80095abcd4493e9c92e1 /src/tools
parent6dd6676700f830547e9e7c38781f09de5f2a1a00 (diff)
Tidy up to use one list of servers.
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/dcpomatic_cli.cc15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/tools/dcpomatic_cli.cc b/src/tools/dcpomatic_cli.cc
index 52a113cbb..788594f0c 100644
--- a/src/tools/dcpomatic_cli.cc
+++ b/src/tools/dcpomatic_cli.cc
@@ -121,7 +121,7 @@ list_servers ()
{
while (true) {
int N = 0;
- list<EncodeServerDescription> servers = EncodeServerFinder::instance()->good_servers ();
+ list<EncodeServerDescription> servers = EncodeServerFinder::instance()->servers();
/* This is a bit fiddly because we want to list configured servers that are down as well
as all those (configured and found by broadcast) that are up.
@@ -144,7 +144,7 @@ list_servers ()
optional<int> threads;
list<EncodeServerDescription>::iterator j = servers.begin ();
while (j != servers.end ()) {
- if (i == j->host_name()) {
+ if (i == j->host_name() && j->current_link_version()) {
threads = j->threads();
list<EncodeServerDescription>::iterator tmp = j;
++tmp;
@@ -164,14 +164,13 @@ list_servers ()
/* Now report any left that have been found by broadcast */
BOOST_FOREACH (EncodeServerDescription const & i, servers) {
- cout << std::left << setw(24) << i.host_name() << " UP " << i.threads() << "\n";
+ if (i.current_link_version()) {
+ cout << std::left << setw(24) << i.host_name() << " UP " << i.threads() << "\n";
+ } else {
+ cout << std::left << setw(24) << i.host_name() << " bad version\n";
+ }
++N;
}
-
- /* And those that have a bad version */
- BOOST_FOREACH (EncodeServerDescription i, EncodeServerFinder::instance()->good_servers()) {
- cout << std::left << setw(24) << i.host_name() << " bad version\n";
- }
}
dcpomatic_sleep (1);