]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
unix-mode: fix return of pcap-file command
authorEric Leblond <eric@regit.org>
Fri, 26 Oct 2012 07:52:11 +0000 (09:52 +0200)
committerEric Leblond <eric@regit.org>
Mon, 19 Nov 2012 22:54:26 +0000 (23:54 +0100)
src/runmode-unix-socket.c

index 0481c7acf414c8bbaf6223998dc62f186e66a38b..5f5020c7ceb6689b1286fc2548506eb23af9be77 100644 (file)
@@ -226,10 +226,10 @@ TmEcode UnixSocketAddPcapFile(json_t *cmd, json_t* answer, void *data)
 
     ret = UnixListAddFile(this, filename, output_dir);
     switch(ret) {
-        case 0:
+        case TM_ECODE_FAILED:
             json_object_set_new(answer, "message", json_string("Unable to add file to list"));
             return TM_ECODE_FAILED;
-        case 1:
+        case TM_ECODE_OK:
             SCLogInfo("Added file '%s' to list", filename);
             json_object_set_new(answer, "message", json_string("Successfully added file to list"));
             return TM_ECODE_OK;