reducing changes of segmentation for null string, syntax of receiver call backs

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@505 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
l_maliakal_d
2013-04-10 13:34:10 +00:00
parent 8088e6231e
commit 02376bbc62
9 changed files with 28 additions and 30 deletions

View File

@ -96,7 +96,6 @@ int multiSlsDetector::initSharedMemory(int id=0) {
multiSlsDetector::multiSlsDetector(int id) : slsDetectorUtils(), shmId(-1)
{
cout << "Contrustor" << endl;
while (shmId<0) {
shmId=initSharedMemory(id);
id++;
@ -4394,7 +4393,6 @@ int* multiSlsDetector::readFrameFromReceiver(char* fName, int &fIndex){
int *retdet, *p=retval;
string fullFName="";
string ext="";
char * pch;
for (int id=0; id<thisMultiDetector->numberOfDetectors; id++) {
@ -4413,7 +4411,10 @@ int* multiSlsDetector::readFrameFromReceiver(char* fName, int &fIndex){
if (strrchr(fName,'.')!=NULL){
ext.assign(fName);
size_t dot = ext.rfind(".");
ext = ext.erase(0,dot);
if(dot != string::npos)
ext = ext.erase(0,dot);
else
ext = "";
}
}
fullFName.append(getReceiverFileNameToConcatenate(fName));