output-lua: improve error checking for init()

If init doesn't properly init the script, skip the script and error
out.
pull/1112/head
Victor Julien 12 years ago
parent 0055a10b3a
commit fe3484fbc0

@ -557,6 +557,10 @@ static OutputCtx *OutputLuaLogInit(ConfNode *conf)
om->PacketConditionFunc = LuaPacketConditionAlerts;
} else if (opts.file) {
om->FileLogFunc = LuaFileLogger;
} else {
SCLogError(SC_ERR_LUAJIT_ERROR, "failed to setup thread module");
SCFree(om);
continue;
}
TAILQ_INSERT_TAIL(&output_ctx->submodules, om, entries);

Loading…
Cancel
Save