Assorted bug fixes

- If SctProcessNode ran into a timeout, its action data wa sdeleted. If data came
  later, this caused SICS to crash. This is now fixed
- sget leaked connections under certain circumstances
- Cosmetic fix to hipadaba.c
- yet another chnage to the TRICS file format in fourmess.c, now it prints magnetic field
  instead of the proton count
This commit is contained in:
2015-07-30 13:57:55 +02:00
parent 950cddc8e5
commit 64d44c2824
4 changed files with 38 additions and 5 deletions

View File

@ -393,7 +393,7 @@ static int FourMessStoreIntern(pSICSOBJ self, SConnection * pCon,
double fHkl[3], double fPosition[4], char *extra)
{
pFourMess priv = self->pPrivate;
float fSum, fSigma, fTemp, fStep, fPreset;
float fSum, fSigma, fTemp, fMF, fStep, fPreset;
int i, iLF, iRet, iNP, ii;
long *lCounts = NULL;
pEVControl pEva = NULL;
@ -486,6 +486,23 @@ static int FourMessStoreIntern(pSICSOBJ self, SConnection * pCon,
iRet = EVCGetPos(pEva, pCon, &fTemp);
}
/* get mf */
fMF = -777.77;
pEva = (pEVControl) FindCommandData(pServ->pSics, "mf",
"Environment Controller");
if (pEva == NULL) {
pPtr = (pDummy) FindCommandData(pServ->pSics, "mf",
"RemObject");
if (pPtr != NULL) {
pDriv = pPtr->pDescriptor->GetInterface(pPtr, DRIVEID);
if (pDriv != NULL) {
fMF = pDriv->GetValue(pPtr, pCon);
}
}
} else {
iRet = EVCGetPos(pEva, pCon, &fMF);
}
/* write profile */
if (priv->profFile) {
/* collect data */
@ -493,12 +510,16 @@ static int FourMessStoreIntern(pSICSOBJ self, SConnection * pCon,
GetScanVarStep(priv->pScanner, 0, &fStep);
fPreset = GetScanPreset(priv->pScanner);
prot = getProtonAverage(priv);
/*
They rather wanted fMF in place of the proton average which fell victim to the
monitor assignement chaos anyway.
*/
if(extra == NULL){
fprintf(priv->profFile, "%3d %7.4f %9.0f %7.3f %12f %s\n", iNP, fStep,
fPreset, fTemp, prot, pBueffel);
fPreset, fTemp, fMF, pBueffel);
} else {
fprintf(priv->profFile, "%3d %7.4f %9.0f %7.3f %12f %s %s\n", iNP, fStep,
fPreset, fTemp, prot, pBueffel,extra);
fPreset, fTemp, fMF, pBueffel,extra);
}
for (i = 0; i < iNP; i++) {
for (ii = 0; ii < 10 && i < iNP; ii++) {