]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[3880] Changes after review:
authorTomek Mrugalski <tomasz@isc.org>
Tue, 16 Jun 2015 15:11:46 +0000 (17:11 +0200)
committerTomek Mrugalski <tomasz@isc.org>
Tue, 16 Jun 2015 15:11:46 +0000 (17:11 +0200)
 - log messages in commandReader are now errors, not warnings
 - missing doxygen comment added

src/lib/config/command_mgr.cc
src/lib/config/command_socket_factory.cc
src/lib/config/config_messages.mes

index 0c6d9e99846fd7b2b1ac270fbcf87903b4d22408..330f44037809ee7dd2e2022e3186757181f3c091 100644 (file)
@@ -140,7 +140,7 @@ CommandMgr::commandReader(int sockfd) {
     int rval = read(sockfd, buf, sizeof(buf));
     if (rval < 0) {
         // Read failed
-        LOG_WARN(command_logger, COMMAND_SOCKET_READ_FAIL).arg(rval).arg(sockfd);
+        LOG_ERROR(command_logger, COMMAND_SOCKET_READ_FAIL).arg(rval).arg(sockfd);
 
         /// @todo: Should we close the connection, similar to what is already
         /// being done for rval == 0?
@@ -180,7 +180,7 @@ CommandMgr::commandReader(int sockfd) {
     if (len > 65535) {
         // Hmm, our response is too large. Let's send the first
         // 64KB and hope for the best.
-        LOG_WARN(command_logger, COMMAND_SOCKET_RESPONSE_TOOLARGE).arg(len);
+        LOG_ERROR(command_logger, COMMAND_SOCKET_RESPONSE_TOOLARGE).arg(len);
 
         len = 65535;
     }
@@ -194,7 +194,7 @@ CommandMgr::commandReader(int sockfd) {
         // Response transmission failed. Since the response failed, it doesn't
         // make sense to send any status codes. Let's log it and be done with
         // it.
-        LOG_WARN(command_logger, COMMAND_SOCKET_WRITE_FAIL).arg(len).arg(sockfd);
+        LOG_ERROR(command_logger, COMMAND_SOCKET_WRITE_FAIL).arg(len).arg(sockfd);
     }
 }
 
index 77a868306d6ada07e9566bb96c8ebb30e3e32816..3193201e104ed70b4e7a0f0b5a9f546f1f6225a4 100644 (file)
@@ -67,6 +67,7 @@ private:
     /// @brief Auxiliary method for creating a UNIX socket
     ///
     /// @param file_name specifies socket file path
+    /// @return socket file descriptor
     int createUnixSocket(const std::string& file_name) {
 
         int fd = socket(AF_UNIX, SOCK_STREAM, 0);
index 97392eeebc8255b733aa49e301f10e9d1782bdec..de1f02c489f6d323dca18b8091c005a9eb12094f 100644 (file)
@@ -52,7 +52,7 @@ This debug message indicates that specified number of bytes was received
 over command socket identified by specified file descriptor.
 
 % COMMAND_SOCKET_READ_FAIL Encountered error %1 while reading from command socket %2
-This warning message indicates that an error was encountered while
+This error message indicates that an error was encountered while
 reading from command socket.
 
 % COMMAND_SOCKET_WRITE Sent response of %1 bytes over command socket %2
@@ -60,14 +60,14 @@ This debug message indicates that the specified number of bytes was sent
 over command socket identifier by the specified file descriptor.
 
 % COMMAND_SOCKET_RESPONSE_TOOLARGE Server's response was larger (%1) than supported 64KB
-This warning message indicates that the server received a command and generated
+This error message indicates that the server received a command and generated
 an answer for it, but that response was larger than supported 64KB. Server
 will attempt to send the first 64KB of the response. Depending on the nature
 of this response, this may indicate a software or configuration error. Future
 Kea versions are expected to have better support for large responses.
 
 % COMMAND_SOCKET_WRITE_FAIL Error while writing %1 bytes to command socket %2
-This warning message indicates that an error was encountered while
+This error message indicates that an error was encountered while
 attempting to send a response to the command socket.
 
 % COMMAND_SOCKET_UNIX_OPEN Command socket opened: UNIX, fd=%1, path=%2