From e2d4347ce6daa0a1c3de606aead8cadeb203881a Mon Sep 17 00:00:00 2001 From: Uwe Seimet Date: Sun, 19 Dec 2021 12:35:50 +0100 Subject: [PATCH] Logging update --- src/raspberrypi/rascsi.cpp | 4 ++++ src/raspberrypi/rascsi_interface.proto | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/raspberrypi/rascsi.cpp b/src/raspberrypi/rascsi.cpp index 675cbef9..c2994666 100644 --- a/src/raspberrypi/rascsi.cpp +++ b/src/raspberrypi/rascsi.cpp @@ -1589,6 +1589,10 @@ static void *MonThread(void *param) } default: { + LOGTRACE("Received unknown command %d", command.operation()); + + ReturnStatus(fd, false, "Unknown command", UNKNOWN_OPERATION); + // Wait until we become idle while (active) { usleep(500 * 1000); diff --git a/src/raspberrypi/rascsi_interface.proto b/src/raspberrypi/rascsi_interface.proto index 1039e059..92482fb5 100644 --- a/src/raspberrypi/rascsi_interface.proto +++ b/src/raspberrypi/rascsi_interface.proto @@ -201,8 +201,10 @@ message PbOperationInfo { enum PbErrorCode { // No error code available NO_ERROR_CODE = 0; + // The client sent an operation code not supported by this server + UNKNOWN_OPERATION = 1; // Authentication/Authorization error - UNAUTHORIZED = 1; + UNAUTHORIZED = 2; } // The supported file extensions mapped to their respective device types