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)))
|
(ConvertInternetAddresstoIpString(result, ip, MAX_STR_LENGTH)))
|
||||||
throw sls::ZmqSocketError("Could convert IP to string");
|
throw sls::ZmqSocketError("Could convert IP to string");
|
||||||
|
|
||||||
|
std::string sip(ip);
|
||||||
// construct address
|
// construct address
|
||||||
sprintf(sockfd.serverAddress, "tcp://%s:%d", ip, portno);
|
sprintf(sockfd.serverAddress, "tcp://%s:%d", sip.c_str(), portno);
|
||||||
#ifdef VERBOSE
|
#ifdef VERBOSE
|
||||||
cprintf(BLUE, "address:%s\n", sockfd.serverAddress);
|
cprintf(BLUE, "address:%s\n", sockfd.serverAddress);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user