mirror of
https://github.com/g4klx/MMDVMHost.git
synced 2026-01-19 23:10:22 +01:00
FIX DMRNewtork infinite failure on domain name resolve
This commit is contained in:
parent
1ab0610543
commit
1b7abded67
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue