diff options
author | deva <deva> | 2006-03-07 10:37:59 +0000 |
---|---|---|
committer | deva <deva> | 2006-03-07 10:37:59 +0000 |
commit | 1390ddfe6afe41dba141f8170f9b277573ebe8cd (patch) | |
tree | fd6861f3eab3a4721f2445540279a8223d7cd1a3 /client/cprlisten.cc | |
parent | 19ade36987f86c9b4cd4c5ec3fc6c499205c61ec (diff) |
*** empty log message ***
Diffstat (limited to 'client/cprlisten.cc')
-rw-r--r-- | client/cprlisten.cc | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/client/cprlisten.cc b/client/cprlisten.cc index 0a4958e..4c1272e 100644 --- a/client/cprlisten.cc +++ b/client/cprlisten.cc @@ -32,11 +32,12 @@ #include <string> using namespace std; +#include "info.h" + #define MAGIC_STOP_STRING "SHUTTHEFUCKUP" -CPRListen::CPRListen(Info *info, unsigned short port) +CPRListen::CPRListen(unsigned short port) { - this->info = info; this->port = port; cpr = "N/A"; cprchanged = false; @@ -55,13 +56,13 @@ void CPRListen::stop() socket.connect("localhost", port); socket.send_string(MAGIC_STOP_STRING); } catch(Network_error &e) { - info->error("In stop(): %s.", e.error.c_str()); + gInfo::info->error("In stop(): %s.", e.error.c_str()); } } void CPRListen::thread_main() { - info->log("Listening for CPRs."); + gInfo::info->log("Listening for CPRs."); while(running) { try { string newcpr; @@ -76,15 +77,15 @@ void CPRListen::thread_main() cprchanged = true; cpr = newcpr; mutex.unlock(); - info->log("Got CPR: %s.", cpr.c_str()); + gInfo::info->log("Got CPR: %s.", cpr.c_str()); } } catch(Network_error &e) { - info->error("In thread_main(): %s.", e.error.c_str()); + gInfo::info->error("In thread_main(): %s.", e.error.c_str()); running = false; } } - info->log("Stopped listening for CPRs."); + gInfo::info->log("Stopped listening for CPRs."); } bool CPRListen::cprChanged() |