zmq fix sprintf serveraddress

This commit is contained in:
2020-03-19 11:15:49 +01:00
parent d43d74a92d
commit 770ca7bb96
2 changed files with 4 additions and 2 deletions

View File

@ -56,8 +56,10 @@ public:
(ConvertInternetAddresstoIpString(result, ip, MAX_STR_LENGTH)))
throw std::exception();
std::string sip(ip);
// construct address
sprintf (sockfd.serverAddress, "tcp://%s:%d", ip, portno);
sprintf (sockfd.serverAddress, "tcp://%s:%d", sip.c_str(), portno);
#ifdef VERBOSE
cprintf(BLUE,"address:%s\n",sockfd.serverAddress);
#endif