Fixed a sget bug from POLDI. Returns OK instead of number

This commit is contained in:
2014-10-21 16:28:06 +02:00
parent b319461531
commit be058abdef
3 changed files with 9 additions and 2 deletions

View File

@ -172,6 +172,13 @@ int SetSICSStatus(SConnection * pCon, SicsInterp * pSics, void *pData,
return 0; return 0;
} }
SCWrite(pCon,"Status is calculated, cannot be set manually any longer", eValue);
return 1;
/*
The code below is defunct and just here for documentary reasons
*/
/* is there a value ? */ /* is there a value ? */
if (argc < 2) { if (argc < 2) {
SCWrite(pCon, "ERROR: missing parameter for SetStatus", eError); SCWrite(pCon, "ERROR: missing parameter for SetStatus", eError);

View File

@ -81,7 +81,7 @@ static int SICSGetCommand(SConnection * pCon, SicsInterp * pSics, void *pData,
if(status){ if(status){
data = formatValue(v,NULL); data = formatValue(v,NULL);
if(data != NULL){ if(data != NULL){
SCWrite(pCon,GetCharArray(data),eValue); SCWrite(pCon,trim(GetCharArray(data)),eValue);
DeleteDynString(data); DeleteDynString(data);
} else { } else {
SCPrintf(pCon,eError,"ERROR: formatting value for %s failed", argv[1]); SCPrintf(pCon,eError,"ERROR: formatting value for %s failed", argv[1]);

View File

@ -2524,7 +2524,7 @@ static int UpdateHdbNode(SConnection * pCon, SicsInterp * pSics,
} }
status = UpdateHipadabaPar(targetNode, newValue, pCon); status = UpdateHipadabaPar(targetNode, newValue, pCon);
ReleaseHdbValue(&newValue); ReleaseHdbValue(&newValue);
if (status == 1) { if (status == 1 && SCinMacro(pCon) == 0) {
SCSendOK(pCon); SCSendOK(pCon);
} }
return status; return status;