unix-manager: doc and whitespace fixes

pull/215/head
Eric Leblond 14 years ago
parent af16c418b7
commit d5457ad70e

@ -380,13 +380,13 @@ int UnixCommandExecute(UnixCommand * this, char *command, UnixClient *client)
int found = 0;
Command *lcmd;
jsoncmd = json_loads(command, 0, &error);
if (jsoncmd == NULL) {
SCLogInfo("Invalid command, error on line %d: %s\n", error.line, error.text);
if (server_msg == NULL) {
return 0;
}
if (server_msg == NULL) {
jsoncmd = json_loads(command, 0, &error);
if (jsoncmd == NULL) {
SCLogInfo("Invalid command, error on line %d: %s\n", error.line, error.text);
goto error;
}
@ -436,6 +436,7 @@ int UnixCommandExecute(UnixCommand * this, char *command, UnixClient *client)
}
json_decref(jsoncmd);
json_decref(server_msg);
return ret;
error_cmd:
@ -512,7 +513,6 @@ int UnixMain(UnixCommand * this)
return 1;
}
TAILQ_FOREACH(uclient, &this->clients, next) {
if (FD_ISSET(uclient->fd, &select_set)) {
UnixCommandRun(this, uclient);
@ -751,7 +751,11 @@ void *UnixManagerThread(void *td)
}
/** \brief spawn the unix socket manager thread */
/** \brief spawn the unix socket manager thread
*
* \param de_ctx context for detection engine
* \param mode if set to 1, init failure cause suricata exit
* */
void UnixManagerThreadSpawn(DetectEngineCtx *de_ctx, int mode)
{
ThreadVars *tv_unixmgr = NULL;

Loading…
Cancel
Save