- add a check for empty return value
This commit is contained in:
@ -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) {
|
||||||
|
Reference in New Issue
Block a user