- fixed mess with SCWrite / SCPrintf due to changes in conman.c

This commit is contained in:
2017-06-14 15:46:32 +02:00
parent 199c8cde5f
commit da2b8c13d4
2 changed files with 12 additions and 10 deletions

View File

@ -84,9 +84,9 @@ static int SCTDRIVCheckLimits(void *data, float val,
if (GetHdbProperty(self->node, "checklimits", script, 1024)) { if (GetHdbProperty(self->node, "checklimits", script, 1024)) {
status = SctCallInContext(pServ->dummyCon, script, status = SctCallInContext(pServ->dummyCon, script,
self->node, self->c, &result); self->node, self->c, &result);
if (SctVerbose(self->c)) { if (SctDebugConn(self->c)) {
SCPrintf(pServ->dummyCon, eWarning, SCPf(SCPureSockWrite, SctDebugConn(self->c), eWarning,
"script %s called with result %s\n ", script, result); "script %s called with result %s\n ", script, result);
} }
if (status == 0) { if (status == 0) {
strlcpy(error, result, errlen); strlcpy(error, result, errlen);
@ -170,8 +170,9 @@ static int SCTDRIVCheckStatus(void *data, SConnection * pCon)
SCPrintf(pCon, eError, " script %s returned %s", script, result); SCPrintf(pCon, eError, " script %s returned %s", script, result);
return HWFault; return HWFault;
} }
if (SctVerbose(self->c)) { if (SctDebugConn(self->c)) {
SCPrintf(pCon, eError, " script %s returned %s", script, result); SCPf(SCPureSockWrite, SctDebugConn(self->c), eError,
" script %s returned %s", script, result);
} }
} }
if (strstr(result, "run") != NULL) { if (strstr(result, "run") != NULL) {

View File

@ -113,9 +113,9 @@ static int SCTDRIVCheckLimits(void *data, float val,
if (GetHdbProperty(self->objectNode, "checklimits", script, 1024)) { if (GetHdbProperty(self->objectNode, "checklimits", script, 1024)) {
status = SctCallInContext(pServ->dummyCon, script, status = SctCallInContext(pServ->dummyCon, script,
self->objectNode, pPriv->c, &result); self->objectNode, pPriv->c, &result);
if (SctVerbose(pPriv->c)) { if (SctDebugConn(pPriv->c)) {
SCPrintf(pServ->dummyCon, eWarning, SCPf(SCPureSockWrite, SctDebugConn(pPriv->c), eWarning,
"script %s called with result %s\n ", script, result); "script %s called with result %s\n ", script, result);
} }
if (status == 0) { if (status == 0) {
strlcpy(error, result, errlen); strlcpy(error, result, errlen);
@ -208,8 +208,9 @@ static int SCTDRIVCheckStatus(void *data, SConnection * pCon)
SCPrintf(pCon, eError, " script %s returned %s", script, result); SCPrintf(pCon, eError, " script %s returned %s", script, result);
return HWFault; return HWFault;
} }
if (SctVerbose(pPriv->c)) { if (SctDebugConn(pPriv->c)) {
SCPrintf(pCon, eError, " script %s returned %s", script, result); SCPf(SCPureSockWrite, SctDebugConn(pPriv->c), eError,
" script %s returned %s", script, result);
} }
} }
if (strstr(result, "run") != NULL) { if (strstr(result, "run") != NULL) {