mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-09 11:30:43 +02:00
Merge branch 'refactor' of github.com:slsdetectorgroup/slsDetectorPackage into refactor
This commit is contained in:
commit
43d478076c
@ -195,7 +195,7 @@ class SharedMemory {
|
|||||||
/**
|
/**
|
||||||
* Maximum length of name as from man pages
|
* 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
|
*Using the call operator to access the pointer
|
||||||
@ -236,8 +236,8 @@ class SharedMemory {
|
|||||||
ss << SHM_MULTI_PREFIX << multiId << SHM_SLS_PREFIX << slsId << sEnvPath;
|
ss << SHM_MULTI_PREFIX << multiId << SHM_SLS_PREFIX << slsId << sEnvPath;
|
||||||
|
|
||||||
std::string temp = ss.str();
|
std::string temp = ss.str();
|
||||||
if (temp.length() > name_max_length) {
|
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;
|
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;
|
FILE_LOG(logERROR) << msg;
|
||||||
throw SharedMemoryError(msg);
|
throw SharedMemoryError(msg);
|
||||||
}
|
}
|
||||||
|
@ -426,7 +426,7 @@ int slsReceiverTCPIPInterface::set_port() {
|
|||||||
} catch(SocketError &e) {
|
} catch(SocketError &e) {
|
||||||
ret = FAIL;
|
ret = FAIL;
|
||||||
// same socket, could not bind port
|
// same socket, could not bind port
|
||||||
sprintf(mess, e.what());
|
sprintf(mess, "%s", e.what());
|
||||||
FILE_LOG(logERROR) << mess;
|
FILE_LOG(logERROR) << mess;
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
ret = FAIL;
|
ret = FAIL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user