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))) (ConvertInternetAddresstoIpString(result, ip, MAX_STR_LENGTH)))
throw std::exception(); throw std::exception();
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

View File

@ -146,7 +146,7 @@ void DataProcessor::ResetParametersforNewMeasurement(){
delete [] tempBuffer; delete [] tempBuffer;
tempBuffer = 0; tempBuffer = 0;
} }
if (*gapPixelsEnable >= 0) { if (*gapPixelsEnable) {
tempBuffer = new char[generalData->imageSize]; tempBuffer = new char[generalData->imageSize];
memset(tempBuffer, 0, generalData->imageSize); memset(tempBuffer, 0, generalData->imageSize);
} }