mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 00:37:00 +08:00
occtl: corrected error code on failed commands
Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
This commit is contained in:
@@ -483,11 +483,12 @@ int handle_unban_ip_cmd(struct unix_ctx *ctx, const char *arg, cmd_params_st *pa
|
||||
|
||||
if (status != 0) {
|
||||
printf("IP '%s' was unbanned\n", arg);
|
||||
ret = 0;
|
||||
} else {
|
||||
printf("could not unban IP '%s'\n", arg);
|
||||
ret = 1;
|
||||
}
|
||||
|
||||
ret = 0;
|
||||
goto cleanup;
|
||||
|
||||
error:
|
||||
@@ -533,11 +534,12 @@ int handle_disconnect_user_cmd(struct unix_ctx *ctx, const char *arg, cmd_params
|
||||
|
||||
if (status != 0) {
|
||||
printf("user '%s' was disconnected\n", arg);
|
||||
ret = 0;
|
||||
} else {
|
||||
printf("could not disconnect user '%s'\n", arg);
|
||||
ret = 1;
|
||||
}
|
||||
|
||||
ret = 0;
|
||||
goto cleanup;
|
||||
|
||||
error:
|
||||
|
||||
Reference in New Issue
Block a user