mirror of
https://github.com/ShaYmez/P25Clients.git
synced 2024-11-25 13:48:45 -05:00
Hopefully fix the display of IP addresses in the reflector.
This commit is contained in:
parent
c367659664
commit
ba9a11615a
@ -357,7 +357,7 @@ void CP25Reflector::dumpRepeaters() const
|
|||||||
char buffer[80U];
|
char buffer[80U];
|
||||||
LogMessage(" %s: %s %u/%u", (*it)->m_callsign.c_str(),
|
LogMessage(" %s: %s %u/%u", (*it)->m_callsign.c_str(),
|
||||||
CUDPSocket::display((*it)->m_addr, buffer, 80U),
|
CUDPSocket::display((*it)->m_addr, buffer, 80U),
|
||||||
(*it)->m_timer.getTimeout(),
|
(*it)->m_timer.getTimer(),
|
||||||
(*it)->m_timer.getTimeout());
|
(*it)->m_timer.getTimeout());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -167,18 +167,18 @@ char* CUDPSocket::display(const sockaddr_storage& addr, char* buffer, unsigned i
|
|||||||
assert(length > INET6_ADDRSTRLEN);
|
assert(length > INET6_ADDRSTRLEN);
|
||||||
|
|
||||||
switch (addr.ss_family) {
|
switch (addr.ss_family) {
|
||||||
case AF_INET: {
|
case AF_INET: {
|
||||||
struct sockaddr_in* in4 = (struct sockaddr_in*)&addr;
|
struct sockaddr_in* in4 = (struct sockaddr_in*)&addr;
|
||||||
::inet_ntop(AF_INET, &in4->sin_addr, buffer, length);
|
::inet_ntop(AF_INET, &in4->sin_addr, buffer, length);
|
||||||
::sprintf(buffer + ::strlen(buffer), ":%u", in4->sin_port);
|
::sprintf(buffer + ::strlen(buffer), ":%u", in4->sin_port);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case AF_INET6: {
|
case AF_INET6: {
|
||||||
struct sockaddr_in6* in6 = (struct sockaddr_in6*)&addr;
|
struct sockaddr_in6* in6 = (struct sockaddr_in6*)&addr;
|
||||||
::inet_ntop(AF_INET6, &in6->sin6_addr, buffer, length);
|
::inet_ntop(AF_INET6, &in6->sin6_addr, buffer, length);
|
||||||
::sprintf(buffer + ::strlen(buffer), ":%u", in6->sin6_port);
|
::sprintf(buffer + ::strlen(buffer), ":%u", in6->sin6_port);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -19,6 +19,6 @@
|
|||||||
#if !defined(VERSION_H)
|
#if !defined(VERSION_H)
|
||||||
#define VERSION_H
|
#define VERSION_H
|
||||||
|
|
||||||
const char* VERSION = "20210824";
|
const char* VERSION = "20210912";
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user