From 794f5cf29a2f6560dbe26d19147e864f6d665dce Mon Sep 17 00:00:00 2001 From: zolliker Date: Thu, 19 Feb 2009 16:11:42 +0000 Subject: [PATCH] - removed temporarely the "OK: ... " message on update --- scriptcontext.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/scriptcontext.c b/scriptcontext.c index 6b4d12e4..ede6c54c 100644 --- a/scriptcontext.c +++ b/scriptcontext.c @@ -369,7 +369,7 @@ static char *SctActionHandler(void *actionData, char *lastReply, state = result; if (strcasecmp(state, "idle") == 0 || strcasecmp(state, "unpoll") == 0) { if (queueData == data && !data->answered) { - SCWrite(con, "o.k.", eStatus); + SCWrite(con, "o.k.", eWarning); } snprintf(eprop, sizeof eprop, "error_during_%s", data->name); emsg = GetHdbProp(node, eprop); @@ -382,7 +382,7 @@ static char *SctActionHandler(void *actionData, char *lastReply, } snprintf(timeKey, sizeof timeKey, "%s_time", data->name); snprintf(timeVal, sizeof timeVal, "%.3f", DoubleTime()); - SetHdbProperty(data->node, timeKey, timeVal); + SetHdbProperty(node, timeKey, timeVal); send = NULL; goto finish; } @@ -400,10 +400,7 @@ static char *SctActionHandler(void *actionData, char *lastReply, SCPrintf(con, eLogError, "ERROR: too many quick scripts chained"); finish: if (strcmp(data->name, "write") == 0) { - /* check if it would be ok to do this only when writestatus property exists: - GetHdbProp(data->node, "writestatus") != NULL - */ - SetHdbProperty(data->node, "writestatus", "commandsent"); + SetProp(node, controller->node, "writestatus", "commandsent"); } if (strcasecmp(state, "unpoll") == 0) { DevUnschedule(controller->devser, data, SctActionHandler, SctMatch); @@ -588,15 +585,13 @@ static hdbCallbackReturn SctActionCallback(Hdb * node, void *userData, if (mm != NULL) { if (queueData != NULL && queueData->conCtx != NULL && !data->answered) { /* update called from a write action */ + /* data->answered = 1; GetHdbPath(node, path, sizeof path); text = formatValue(*(mm->v), node); - /* Markus: who is receiving this message? - It gave unwanted output to me. MK - Answer: a commandline client -> outcode eStatus correct? - */ - SCPrintf(queueData->conCtx, eStatus, "%s = %s", path, GetCharArray(text)); + SCPrintf(queueData->conCtx, eWarning, "OK: %s set to: %s", path, GetCharArray(text)); DeleteDynString(text); + */ } return hdbContinue; }