Some more fine tuning of log output

Corrected a misleading warning in motorsec.c
Fixed a core dump caused by copyNode in sicsdata.c. Was caused by a bad call
to getPointer.
This commit is contained in:
2016-05-10 11:29:09 +02:00
parent e476d19040
commit 7f6b31e098
4 changed files with 4 additions and 5 deletions

View File

@ -307,7 +307,7 @@ SConnection *SCCreateDummyConnection(SicsInterp * pSics)
pRes->iUserRights = usInternal;
pRes->iGrab = 0;
Log(INFO,"SYS","%s","Accepted dummy connection ");
/* Log(INFO,"SYS","%s","Accepted dummy connection "); */
return pRes;
}
@ -837,7 +837,7 @@ static void testAndWriteLog(SConnection * self, char *buffer, int iOut)
}else if(strstr(buffer,"WARNING") != NULL) {
Log(WARN,"notify",buffer);
} else {
Log(INFO,"notify",buffer);
Log(DEBUG,"notify",buffer);
}
break;
case eHdbEvent:

View File

@ -129,7 +129,6 @@ void LogClose(void *data);
void formatSeverity(unsigned int severity,
char *buffer, unsigned int bufferLength);
extern unsigned int logEnabledArray[];
#define logEnabled(subsystem,severity) (severity <= logEnabledArray[subsystem])

View File

@ -324,7 +324,7 @@ static int SecMotorStatus(void *sulf, SConnection * pCon)
handleMoveCallback(self, pCon);
status = HWBusy;
} else if (strstr(v.v.text, "poserror") != NULL) {
SCWrite(pCon,"WARNING: Position not reached",eLog);
SCWrite(pCon,"WARNING: Position repositioned",eLog);
status = checkPosition(self, pCon);
} else if (strstr(v.v.text, "restart") != NULL) {
SCPrintf(pCon,eLog,"WARNING: restarting motor %s", self->name);

View File

@ -866,7 +866,7 @@ static int copyNode(pSICSData self, int argc, char *argv[],
break;
case HIPINTAR:
case HIPINTVARAR:
memcpy(iData+pos, node->value.v.intArray, length*sizeof(int));
memcpy(iData, node->value.v.intArray, length*sizeof(int));
assignType(self, pos, pos + length, INTTYPE);
break;
case HIPFLOATAR: