]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
unix-manager: log client (dis)connection with DEBUG level.
authorAlexander Gozman <a.gozman@securitycode.ru>
Sun, 27 Sep 2015 19:03:12 +0000 (22:03 +0300)
committerVictor Julien <victor@inliniac.net>
Thu, 8 Oct 2015 08:35:07 +0000 (10:35 +0200)
Also select/receive errors are logged as ERROR.

src/unix-manager.c

index 1960df5699431f4c05e37e3fb6dede667464185c..9357f4c50453d03ad4392101271a195481281695 100644 (file)
@@ -356,7 +356,7 @@ int UnixCommandAccept(UnixCommand *this)
     json_decref(server_msg);
 
     /* client connected */
-    SCLogInfo("Unix socket: client connected");
+    SCLogDebug("Unix socket: client connected");
 
     uclient = SCMalloc(sizeof(UnixClient));
     if (unlikely(uclient == NULL)) {
@@ -478,9 +478,9 @@ void UnixCommandRun(UnixCommand * this, UnixClient *client)
     ret = recv(client->fd, buffer, sizeof(buffer) - 1, 0);
     if (ret <= 0) {
         if (ret == 0) {
-            SCLogInfo("Unix socket: lost connection with client");
+            SCLogDebug("Unix socket: lost connection with client");
         } else {
-            SCLogInfo("Unix socket: error on recv() from client: %s",
+            SCLogError(SC_ERR_SOCKET, "Unix socket: error on recv() from client: %s",
                       strerror(errno));
         }
         UnixCommandClose(this, client->fd);
@@ -525,7 +525,7 @@ int UnixMain(UnixCommand * this)
         if (errno == EINTR) {
             return 1;
         }
-        SCLogInfo("Command server: select() fatal error: %s", strerror(errno));
+        SCLogError(SC_ERR_SOCKET, "Command server: select() fatal error: %s", strerror(errno));
         return 0;
     }