mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-24 07:20:01 +02:00
zmq server address copy warning fix
This commit is contained in:
parent
40c5ccfe37
commit
75692c3539
@ -23,8 +23,9 @@ ZmqSocket::ZmqSocket(const char *const hostname_or_ip,
|
||||
(ConvertInternetAddresstoIpString(result, ip, MAX_STR_LENGTH)))
|
||||
throw sls::ZmqSocketError("Could convert IP to string");
|
||||
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user