Fix network ports datatype (unsigned int -> unsigned short). UDPSocket: fix old bug using m_port instead of m_port[x].

This commit is contained in:
Daniel Caujolle-Bert
2021-04-25 07:51:01 +02:00
parent 7b1ba5d849
commit ee2d6fd488
23 changed files with 98 additions and 96 deletions
+4 -4
View File
@@ -48,13 +48,13 @@ CReflectors::~CReflectors()
m_reflectors.clear();
}
void CReflectors::setParrot(const std::string& address, unsigned int port)
void CReflectors::setParrot(const std::string& address, unsigned short port)
{
m_parrotAddress = address;
m_parrotPort = port;
}
void CReflectors::setP252DMR(const std::string& address, unsigned int port)
void CReflectors::setP252DMR(const std::string& address, unsigned short port)
{
m_p252dmrAddress = address;
m_p252dmrPort = port;
@@ -81,7 +81,7 @@ bool CReflectors::load()
if (p1 != NULL && p2 != NULL && p3 != NULL) {
std::string host = std::string(p2);
unsigned int port = (unsigned int)::atoi(p3);
unsigned short port = (unsigned short)::atoi(p3);
sockaddr_storage addr;
unsigned int addrLen;
@@ -116,7 +116,7 @@ bool CReflectors::load()
unsigned int id = (unsigned int)::atoi(p1);
if (find(id) == NULL) {
std::string host = std::string(p2);
unsigned int port = (unsigned int)::atoi(p3);
unsigned short port = (unsigned short)::atoi(p3);
sockaddr_storage addr;
unsigned int addrLen;