mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-20 22:45:44 +08:00
FIX DMRNewtork infinite failure on domain name resolve
This commit is contained in:
@@ -34,6 +34,7 @@ const unsigned int HOMEBREW_DATA_PACKET_LENGTH = 55U;
|
||||
|
||||
|
||||
CDMRNetwork::CDMRNetwork(const std::string& address, unsigned int port, unsigned int local, unsigned int id, const std::string& password, bool duplex, const char* version, bool debug, bool slot1, bool slot2, HW_TYPE hwType) :
|
||||
m_addressStr(address),
|
||||
m_address(),
|
||||
m_port(port),
|
||||
m_id(NULL),
|
||||
@@ -122,7 +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();
|
||||
|
||||
@@ -57,6 +57,7 @@ public:
|
||||
void close();
|
||||
|
||||
private:
|
||||
std::string m_addressStr;
|
||||
in_addr m_address;
|
||||
unsigned int m_port;
|
||||
uint8_t* m_id;
|
||||
|
||||
Reference in New Issue
Block a user