From 7479ec3025077520f25cef3fb61227c55dbc7171 Mon Sep 17 00:00:00 2001 From: ubinator <ntadic001@gmail.com> Date: Tue, 18 Feb 2025 22:39:24 +0100 Subject: [PATCH] Stopped ignoring error on client command parse. I figure this might be worth doing. I know now we output the error on the client and the server now has error handling code for nothing in it's argument handling code. I think ideally we should pass the parsed cmd structure to the server and thus avoid parsing twice. This commit doesn't do that yet. --- client.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client.c b/client.c index 26e48df3..a59b05b9 100644 --- a/client.c +++ b/client.c @@ -266,8 +266,11 @@ client_main(struct event_base *base, int argc, char **argv, uint64_t flags, if (cmd_list_any_have(pr->cmdlist, CMD_STARTSERVER)) flags |= CLIENT_STARTSERVER; cmd_list_free(pr->cmdlist); - } else + } else { + fprintf(stderr, "%s\n", pr->error); free(pr->error); + return 1; + } args_free_values(values, argc); free(values); }