[Openvpn-devel,v1] Repeat the unknown command in errors from management interface

Message ID 20240506142303.13198-1-gert@greenie.muc.de
State Accepted
Headers show
Series [Openvpn-devel,v1] Repeat the unknown command in errors from management interface | expand

Commit Message

Gert Doering May 6, 2024, 2:23 p.m. UTC
From: Arne Schwabe <arne@rfc2549.org>

This help pinpointing errors in logs from my app

Change-Id: Ie2b62bc95371daf7e1eb58e0323835f169399910
Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: Frank Lichtenheld <frank@lichtenheld.com>
---

This change was reviewed on Gerrit and approved by at least one
developer. I request to merge it to master.

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/584
This mail reflects revision 1 of this Change.

Acked-by according to Gerrit (reflected above):
Frank Lichtenheld <frank@lichtenheld.com>

Comments

Gert Doering May 6, 2024, 3:37 p.m. UTC | #1
Not tested, but trivial enough, and the actual format of the ERROR:
message is not guaranteed so GUIs shouldn't be surprised if it
changes.

Your patch has been applied to the master branch.

commit b90a6e56250ccb18b4913bb115e5dcf4905dbfb1
Author: Arne Schwabe
Date:   Mon May 6 16:23:03 2024 +0200

     Repeat the unknown command in errors from management interface

     Signed-off-by: Arne Schwabe <arne@rfc2549.org>
     Acked-by: Frank Lichtenheld <frank@lichtenheld.com>
     Message-Id: <20240506142303.13198-1-gert@greenie.muc.de>
     URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg28621.html
     Signed-off-by: Gert Doering <gert@greenie.muc.de>


--
kind regards,

Gert Doering

Patch

diff --git a/src/openvpn/manage.c b/src/openvpn/manage.c
index 43c5507..415ee7a 100644
--- a/src/openvpn/manage.c
+++ b/src/openvpn/manage.c
@@ -1663,7 +1663,7 @@ 
 #endif
     else
     {
-        msg(M_CLIENT, "ERROR: unknown command, enter 'help' for more options");
+        msg(M_CLIENT, "ERROR: unknown command [%s], enter 'help' for more options", p[0]);
     }
 
 done: