Attention is currently required from: Arne Schwabe.
Hello Arne Schwabe,
I'd like you to do a code review.
Please visit
https://gerrit.openvpn.net/c/openvpn/+/2231?usp=email
to review the following change.
Change subject: manage: use report_command_status() for client-deny,
client-kill, push-update
......................................................................
manage: use report_command_status() for client-deny, client-kill, push-update
These printed the same SUCCESS/ERROR lines by hand. Output is unchanged.
Change-Id: Ied65202d269dedfa7ce69e62ef68d775ec0da36c
---
M src/openvpn/manage.c
1 file changed, 3 insertions(+), 22 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/31/2231/1
diff --git a/src/openvpn/manage.c b/src/openvpn/manage.c
index 86c498e..ab814d5 100644
--- a/src/openvpn/manage.c
+++ b/src/openvpn/manage.c
@@ -1286,14 +1286,7 @@
{
const bool status = (*man->persist.callback.client_auth)(
man->persist.callback.arg, cid, kid, false, reason,
client_reason, NULL);
- if (status)
- {
- msg(M_CLIENT, "SUCCESS: client-deny command succeeded");
- }
- else
- {
- msg(M_CLIENT, "ERROR: client-deny command failed");
- }
+ report_command_status(status, "client-deny");
}
else
{
@@ -1312,14 +1305,7 @@
{
const bool status =
(*man->persist.callback.kill_by_cid)(man->persist.callback.arg, cid, kill_msg);
- if (status)
- {
- msg(M_CLIENT, "SUCCESS: client-kill command succeeded");
- }
- else
- {
- msg(M_CLIENT, "ERROR: client-kill command failed");
- }
+ report_command_status(status, "client-kill");
}
else
{
@@ -1523,12 +1509,7 @@
status =
(*man->persist.callback.push_update_by_cid)(man->persist.callback.arg, cid,
p[2]);
}
- if (status)
- {
- msg(M_CLIENT, "SUCCESS: push-update command succeeded");
- return;
- }
- msg(M_CLIENT, "ERROR: push-update command failed");
+ report_command_status(status, "push-update");
}
static void
--
To view, visit https://gerrit.openvpn.net/c/openvpn/+/2231?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ied65202d269dedfa7ce69e62ef68d775ec0da36c
Gerrit-Change-Number: 2231
Gerrit-PatchSet: 1
Gerrit-Owner: Răzvan Cojocaru <[email protected]>
Gerrit-Reviewer: Arne Schwabe <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: Arne Schwabe <[email protected]>
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel