From aa101205743378285e6ab9e719b968edcbf60062 Mon Sep 17 00:00:00 2001 From: l_maliakal_d Date: Tue, 16 Oct 2012 12:41:24 +0000 Subject: [PATCH] bugfix:receiverip checked for dots in the exact place, also updated receiver using multislsdetector reference git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@294 951219d9-93cf-4727-9268-0efd64621fa3 --- .../slsDetector/slsDetector.cpp | 20 +++++++++---------- .../slsDetector/slsDetectorBase.h | 1 - 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/slsDetectorSoftware/slsDetector/slsDetector.cpp b/slsDetectorSoftware/slsDetector/slsDetector.cpp index 3e38d1c25..cf2eeb51a 100644 --- a/slsDetectorSoftware/slsDetector/slsDetector.cpp +++ b/slsDetectorSoftware/slsDetector/slsDetector.cpp @@ -4452,13 +4452,13 @@ char* slsDetector::setReceiverIP(string receiverIP){ struct sockaddr_in sa; if(receiverIP.length()<16){ - if((receiverIP[3]=='.')&&(receiverIP[7]=='.')&&(receiverIP[11]=='.')){ + // if((receiverIP[3]=='.')&&(receiverIP[7]=='.')&&(receiverIP[11]=='.')){ int result = inet_pton(AF_INET, receiverIP.c_str(), &(sa.sin_addr)); if(result!=0){ sprintf(thisDetector->receiverIP,receiverIP.c_str()); wrongFormat=0; } - } + // } } if(wrongFormat) @@ -5764,16 +5764,16 @@ int slsDetector::updateReceiverNoWait() { char lastClientIP[INET_ADDRSTRLEN]; n = dataSocket->ReceiveDataOnly(lastClientIP,sizeof(lastClientIP)); - //#ifdef VERBOSE +#ifdef VERBOSE cout << "Updating receiver last modified by " << lastClientIP << std::endl; - //#endif +#endif - n = dataSocket->ReceiveDataOnly(&ind,sizeof(ind)); cout<<"index:"<xx=xx;update file index how? - n = dataSocket->ReceiveDataOnly(path,MAX_STR_LENGTH); cout<<"path:"<xx=xx;update file index how? - n = dataSocket->ReceiveDataOnly(path,MAX_STR_LENGTH); cout<<"name:"<xx=xx;update file index how? + n = dataSocket->ReceiveDataOnly(&ind,sizeof(ind)); + parentDet->setFileIndex(ind); + n = dataSocket->ReceiveDataOnly(path,MAX_STR_LENGTH); + parentDet->setFilePath(path); + n = dataSocket->ReceiveDataOnly(path,MAX_STR_LENGTH); + parentDet->setFileName(path); return OK; } diff --git a/slsDetectorSoftware/slsDetector/slsDetectorBase.h b/slsDetectorSoftware/slsDetector/slsDetectorBase.h index b26a6ee00..8c1ba5edf 100644 --- a/slsDetectorSoftware/slsDetector/slsDetectorBase.h +++ b/slsDetectorSoftware/slsDetector/slsDetectorBase.h @@ -444,7 +444,6 @@ class slsDetectorBase : public virtual slsDetectorDefs { /** Sets up the receiver file directory - @param fileName fileDir file directory \returns file dir */ virtual string setReceiverFileDir(string fileDir="")=0;