X-Git-Url: https://git.sesse.net/?p=ccbs;a=blobdiff_plain;f=bigscreen%2Fccbs_bigscreen.cpp;h=08d2bf24576fad8da550d4c5f07e7ebdad037638;hp=d5bb931ba5799c902e5068e4fa29b2b7249614d2;hb=251dc64c47b1dc78e73316e76637986da97fd149;hpb=7b04e82cf97ac4f23290222ee4614f926515ac3b diff --git a/bigscreen/ccbs_bigscreen.cpp b/bigscreen/ccbs_bigscreen.cpp index d5bb931..08d2bf2 100644 --- a/bigscreen/ccbs_bigscreen.cpp +++ b/bigscreen/ccbs_bigscreen.cpp @@ -9,7 +9,7 @@ public: std::string name; }; -Tournament tourn; +Tournament active_tournament; /* A trigger that sets a flag whenever it's trigged. */ class FlagTrigger : pqxx::trigger { @@ -62,19 +62,19 @@ public: void init(pqxx::connection &conn) { - conn.perform(FetchCurrentTournament(&tourn)); + conn.perform(FetchCurrentTournament(&active_tournament)); - if (tourn.id == -1) { + if (active_tournament.id == -1) { std::fprintf(stderr, "No active tournament\n"); } else { std::fprintf(stderr, "Current tournament is %d (name: '%s')\n", - tourn.id, tourn.name.c_str()); + active_tournament.id, active_tournament.name.c_str()); } } void main_loop(pqxx::connection &conn) { - if (tourn.id == -1) { + if (active_tournament.id == -1) { // No active tournament, sleep a second or so and exit sleep(1); return;