mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-28 17:10:03 +02:00
solved errors with client compile, rxr yet to do
This commit is contained in:
parent
4bcc24a59f
commit
7d5b24fe33
@ -957,8 +957,10 @@ int slsDetector::setDetectorType(detectorType const type) {
|
||||
(int)thisDetector->myDetectorType << std::endl;
|
||||
#endif
|
||||
if (connectData() == OK){
|
||||
ret=thisReceiver->sendInt(fnum2,retval,(int)thisDetector->myDetectorType);
|
||||
int arg = 0;
|
||||
ret=thisReceiver->sendInt(fnum2,arg,(int)thisDetector->myDetectorType);
|
||||
disconnectData();
|
||||
retval = (detectorType)arg;
|
||||
}
|
||||
if(ret==FAIL){
|
||||
std::cout << "ERROR: Could not send detector type to receiver" << std::endl;
|
||||
@ -1521,7 +1523,6 @@ std::string slsDetector::getLastClientIP() {
|
||||
|
||||
int fnum=F_GET_LAST_CLIENT_IP;
|
||||
char clientName[INET_ADDRSTRLEN];
|
||||
char mess[MAX_STR_LENGTH]="";
|
||||
int ret=OK;
|
||||
|
||||
if (thisDetector->onlineFlag==ONLINE_FLAG) {
|
||||
@ -1555,7 +1556,7 @@ int slsDetector::exitServer() {
|
||||
std::cout<< "Shutting down the Detector server" << std::endl;
|
||||
std::cout<< std::endl;
|
||||
}
|
||||
return retval;
|
||||
return ret;
|
||||
|
||||
}
|
||||
|
||||
@ -1669,8 +1670,6 @@ int slsDetector::updateDetectorNoWait() {
|
||||
int slsDetector::updateDetector() {
|
||||
int fnum=F_UPDATE_CLIENT;
|
||||
int ret=OK;
|
||||
char mess[MAX_STR_LENGTH]="";
|
||||
|
||||
if (thisDetector->onlineFlag==ONLINE_FLAG) {
|
||||
if (connectControl() == OK){
|
||||
controlSocket->SendDataOnly(&fnum,sizeof(fnum));
|
||||
|
@ -576,10 +576,9 @@ public:
|
||||
* Executes a system command on the detector server
|
||||
* e.g. mount an nfs disk, reboot and returns answer etc.
|
||||
* @param cmd command to be executed
|
||||
* @param answer is the answer from the detector
|
||||
* @returns OK or FAIL
|
||||
*/
|
||||
int execCommand(std::string cmd, std::string answer);
|
||||
int execCommand(std::string cmd);
|
||||
|
||||
/**
|
||||
* Updates some of the shared memory receiving the data from the detector
|
||||
|
@ -2434,9 +2434,10 @@ string slsDetectorCommand::cmdExitServer(int narg, char *args[], int action, int
|
||||
}
|
||||
else if (cmd=="execcommand"){
|
||||
myDet->setOnline(ONLINE_FLAG, detPos);
|
||||
if(myDet->execCommand(std::string(argv[1]), detPos)==OK)
|
||||
if(myDet->execCommand(std::string(args[1]), detPos)==OK)
|
||||
return string("Command executed successfully\n");
|
||||
else
|
||||
|
||||
return string("Command failed\n");
|
||||
}
|
||||
else return("cannot decode command\n");
|
||||
|
@ -1,4 +1,4 @@
|
||||
MAINDIR=slsDetectorsPackage
|
||||
MAINDIR=slsDetectorPackage
|
||||
SPECDIR=slsReceiverSoftware
|
||||
TMPFILE=include/gitInfoReceiverTmp.h
|
||||
INCLFILE=include/gitInfoReceiver.h
|
||||
|
Loading…
x
Reference in New Issue
Block a user