Skip to content

Commit

Permalink
added type cast
Browse files Browse the repository at this point in the history
  • Loading branch information
mkalkbrenner committed Mar 8, 2024
1 parent ea138b0 commit 34dc1b9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/DMD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,8 @@ bool DMD::ConnectDMDServer()
{
Config* const pConfig = Config::GetInstance();
sockpp::initialize();
m_pDMDServerConnector = new sockpp::tcp_connector({pConfig->GetDmdServerAddr(), pConfig->GetDmdServerPort()});
m_pDMDServerConnector =
new sockpp::tcp_connector({pConfig->GetDmdServerAddr(), (in_port_t)pConfig->GetDmdServerPort()});
}
return (m_pDMDServerConnector);
}
Expand Down
4 changes: 2 additions & 2 deletions src/dmdServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,15 +156,15 @@ int main(int argc, char* argv[])

if (pPort)
{
int port;
in_port_t port;
std::stringstream ssPort(pPort);
ssPort >> port;
pConfig->SetDmdServerPort(port);
}

sockpp::initialize();

sockpp::tcp_acceptor acc({pConfig->GetDmdServerAddr(), pConfig->GetDmdServerPort()});
sockpp::tcp_acceptor acc({pConfig->GetDmdServerAddr(), (in_port_t)pConfig->GetDmdServerPort()});
if (!acc)
{
cerr << "Error creating the acceptor: " << acc.last_error_str() << endl;
Expand Down

0 comments on commit 34dc1b9

Please sign in to comment.