Rename broadcast thread to search thread.
authorCarl Hetherington <cth@carlh.net>
Mon, 6 Jul 2015 12:44:05 +0000 (13:44 +0100)
committerCarl Hetherington <cth@carlh.net>
Mon, 6 Jul 2015 12:44:05 +0000 (13:44 +0100)
src/lib/server_finder.cc
src/lib/server_finder.h

index a189ae8027dbcb44762b822d281ecc089335ca8e..ecda385eb4782c69f0e09922840f61ecd44707a6 100644 (file)
@@ -41,11 +41,11 @@ ServerFinder* ServerFinder::_instance = 0;
 
 ServerFinder::ServerFinder ()
        : _disabled (false)
-       , _broadcast_thread (0)
+       , _search_thread (0)
        , _listen_thread (0)
        , _stop (false)
 {
-       _broadcast_thread = new boost::thread (boost::bind (&ServerFinder::broadcast_thread, this));
+       _search_thread = new boost::thread (boost::bind (&ServerFinder::search_thread, this));
        _listen_thread = new boost::thread (boost::bind (&ServerFinder::listen_thread, this));
        Config::instance()->Changed.connect (boost::bind (&ServerFinder::config_changed, this, _1));
 }
@@ -54,15 +54,15 @@ ServerFinder::~ServerFinder ()
 {
        _stop = true;
 
-       _broadcast_thread->interrupt ();
-       _broadcast_thread->join ();
+       _search_thread->interrupt ();
+       _search_thread->join ();
 
        _listen_io_service.stop ();
        _listen_thread->join ();
 }
 
 void
-ServerFinder::broadcast_thread ()
+ServerFinder::search_thread ()
 try
 {
        boost::system::error_code error;
index c43c2a422ee9c5e1dceeaa4d7962d0ad29cb1bf1..22f44eeb8a06641d96aaec0bbac65fb5bebe8d74 100644 (file)
@@ -45,7 +45,7 @@ private:
        ServerFinder ();
        ~ServerFinder ();
 
-       void broadcast_thread ();
+       void search_thread ();
        void listen_thread ();
 
        bool server_found (std::string) const;
@@ -56,8 +56,8 @@ private:
 
        bool _disabled;
 
-       /** Thread to periodically issue broadcasts to find encoding servers */
-       boost::thread* _broadcast_thread;
+       /** Thread to periodically issue broadcasts and requests to find encoding servers */
+       boost::thread* _search_thread;
        /** Thread to listen to the responses from servers */
        boost::thread* _listen_thread;