mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-23 15:00:02 +02:00
minor
This commit is contained in:
parent
c0d5303b70
commit
fad73a57aa
@ -195,7 +195,7 @@ class SharedMemory {
|
||||
/**
|
||||
* Maximum length of name as from man pages
|
||||
*/
|
||||
static const int name_max_length = 255;
|
||||
static const int NAME_MAX_LENGTH = 255;
|
||||
|
||||
/**
|
||||
*Using the call operator to access the pointer
|
||||
@ -236,8 +236,8 @@ class SharedMemory {
|
||||
ss << SHM_MULTI_PREFIX << multiId << SHM_SLS_PREFIX << slsId << sEnvPath;
|
||||
|
||||
std::string temp = ss.str();
|
||||
if (temp.length() > name_max_length) {
|
||||
std::string msg = "Shared memory initialization failed. " + temp + " has " + std::to_string(temp.length()) + " characters. \n" + "Maximum is " + std::to_string(name_max_length) + ". Change the environment variable " + SHM_ENV_NAME;
|
||||
if (temp.length() > NAME_MAX_LENGTH) {
|
||||
std::string msg = "Shared memory initialization failed. " + temp + " has " + std::to_string(temp.length()) + " characters. \n" + "Maximum is " + std::to_string(NAME_MAX_LENGTH) + ". Change the environment variable " + SHM_ENV_NAME;
|
||||
FILE_LOG(logERROR) << msg;
|
||||
throw SharedMemoryError(msg);
|
||||
}
|
||||
@ -301,4 +301,4 @@ class SharedMemory {
|
||||
T *shared_struct{nullptr};
|
||||
};
|
||||
|
||||
} // namespace sls
|
||||
} // namespace sls
|
||||
|
@ -426,7 +426,7 @@ int slsReceiverTCPIPInterface::set_port() {
|
||||
} catch(SocketError &e) {
|
||||
ret = FAIL;
|
||||
// same socket, could not bind port
|
||||
sprintf(mess, e.what());
|
||||
sprintf(mess, "%s", e.what());
|
||||
FILE_LOG(logERROR) << mess;
|
||||
} catch (...) {
|
||||
ret = FAIL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user