- add a check for empty return value

This commit is contained in:
zolliker
2013-06-07 06:26:52 +00:00
parent 3f6a76052d
commit 565f96b5ca

View File

@ -485,6 +485,10 @@ static char *SctActionHandler(void *actionData, char *lastReply,
sct->sendCalled = 0; sct->sendCalled = 0;
SyncedBegin(data->syncid); SyncedBegin(data->syncid);
ret = SctCallInContext(con, script, node, controller, &result); ret = SctCallInContext(con, script, node, controller, &result);
if (result[0] == '\0') {
ret = 0;
result = "empty response - probably missing return statement";
}
SyncedEnd(data->syncid); SyncedEnd(data->syncid);
sct->sendNode = NULL; sct->sendNode = NULL;
if (ret == 0) { if (ret == 0) {