- Many fixes to the new scriptcontext to make it work

This commit is contained in:
koennecke
2008-06-18 14:08:25 +00:00
parent ed304fb5f1
commit 45ac6c526f
12 changed files with 74 additions and 13 deletions

View File

@@ -268,6 +268,7 @@ static char *SctActionHandler(void *actionData, char *lastReply) {
char *send = NULL;
int i;
SConnection *con;
char timeKey[50], timeVal[50];
if (currentCon) {
con = SCStorePush(currentCon);
@@ -297,6 +298,12 @@ static char *SctActionHandler(void *actionData, char *lastReply) {
if (currentCon && ! data->answered) {
SCWrite(con, "o.k.", eValue);
}
if(strcmp(data->name,"write") == 0){
SetHdbProperty(data->node,"writestatus","commandsent");
}
snprintf(timeKey,50,"%s_time",data->name);
snprintf(timeVal,50,"%.3f", DoubleTime());
SetHdbProperty(data->node,timeKey,timeVal);
goto finish;
}
SetProp(node, controller->node, "state", state);
@@ -1022,3 +1029,7 @@ void SctInit(void) {
AddCommand(pServ->pSics, "sct", SctCommand, SctKill, sct);
AddCmd("makesctcontroller", SctMakeController);
}
int SctVerbose(SctController *c){
return c->verbose;
}