diff --git a/DMRNetwork.cpp b/DMRNetwork.cpp index e3337d1..86bc335 100644 --- a/DMRNetwork.cpp +++ b/DMRNetwork.cpp @@ -26,7 +26,7 @@ #include #include #include -#include +#include const unsigned int BUFFER_LENGTH = 500U; @@ -123,10 +123,10 @@ void CDMRNetwork::setConfig(const std::string& callsign, unsigned int rxFrequenc bool CDMRNetwork::open() { LogMessage("DMR, Opening DMR Network"); + if (m_address.s_addr == INADDR_NONE) - { m_address = CUDPSocket::lookup(m_addressStr); - } + m_status = WAITING_CONNECT; m_timeoutTimer.stop(); m_retryTimer.start(); diff --git a/DStarNetwork.cpp b/DStarNetwork.cpp index 8da0740..ebf971f 100644 --- a/DStarNetwork.cpp +++ b/DStarNetwork.cpp @@ -26,7 +26,7 @@ #include #include #include -#include +#include const unsigned int BUFFER_LENGTH = 100U; diff --git a/MMDVMHost.cpp b/MMDVMHost.cpp index 8f3594f..31b8db7 100644 --- a/MMDVMHost.cpp +++ b/MMDVMHost.cpp @@ -46,7 +46,8 @@ #include #include -#include + +#include #if !defined(_WIN32) && !defined(_WIN64) #include diff --git a/StopWatch.cpp b/StopWatch.cpp index 37925d4..2f15645 100644 --- a/StopWatch.cpp +++ b/StopWatch.cpp @@ -17,7 +17,6 @@ */ #include "StopWatch.h" -#include #if defined(_WIN32) || defined(_WIN64) @@ -53,6 +52,7 @@ unsigned int CStopWatch::elapsed() #else #include +#include CStopWatch::CStopWatch() : m_start() @@ -66,7 +66,8 @@ CStopWatch::~CStopWatch() unsigned long CStopWatch::start() { ::clock_gettime(CLOCK_MONOTONIC, &m_start); - return (m_start.tv_sec * 1000UL) + (m_start.tv_nsec / 1000000UL); + + return m_start.tv_sec * 1000UL + m_start.tv_nsec / 1000000UL; } unsigned int CStopWatch::elapsed()