Gert Doering has submitted this change. ( https://gerrit.openvpn.net/c/openvpn/+/2231?usp=email )
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 Signed-off-by: Razvan Cojocaru <[email protected]> Acked-by: Gert Doering <[email protected]> Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2231 Message-Id: <[email protected]> URL: https://www.mail-archive.com/[email protected]/msg41785.html Signed-off-by: Gert Doering <[email protected]> --- M src/openvpn/manage.c 1 file changed, 3 insertions(+), 22 deletions(-) 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: merged Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: Ied65202d269dedfa7ce69e62ef68d775ec0da36c Gerrit-Change-Number: 2231 Gerrit-PatchSet: 3 Gerrit-Owner: Răzvan Cojocaru <[email protected]> Gerrit-Reviewer: Arne Schwabe <[email protected]> Gerrit-Reviewer: Gert Doering <[email protected]> Gerrit-CC: openvpn-devel <[email protected]>
_______________________________________________ Openvpn-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openvpn-devel
