housekeeping

main
Tom Early 4 years ago
parent 9bac4f4643
commit a8196c9f84

@ -35,9 +35,23 @@ bool CController::Start()
void CController::Stop()
{
keep_running = false;
reflectorThread.get();
ambeThread.get();
if (reflectorThread.valid())
reflectorThread.get();
if (ambeThread.valid())
ambeThread.get();
reader.Close();
for (auto &it : dstar_device)
{
it->CloseDevice();
it.reset();
}
dstar_device.clear();
for (auto &it : dmr_device)
{
it->CloseDevice();
it.reset();
}
dmr_device.clear();
}
bool CController::InitDevices()

@ -14,6 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
#include <unistd.h>
#include <iostream>
#include "Controller.h"
@ -24,6 +25,8 @@ int main()
if (controller.Start())
return EXIT_FAILURE;
pause();
controller.Stop();
return EXIT_SUCCESS;

Loading…
Cancel
Save

Powered by TurnKey Linux.