From 27fe085f873c0cc0991a6f34cc0342c0f66e7af7 Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Thu, 11 Dec 2014 09:44:35 +0100 Subject: [PATCH] sysdb: Clear the current command from the buffer after error. --- src/tools/sysdb/command.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tools/sysdb/command.c b/src/tools/sysdb/command.c index 1436618..7737a2e 100644 --- a/src/tools/sysdb/command.c +++ b/src/tools/sysdb/command.c @@ -176,10 +176,11 @@ sdb_command_exec(sdb_input_t *input) * sends back. We'll wait for the first reply and then return to the * main loop which will handle any subsequent replies, including * eventually the reply to the query (if it's not the first reply). */ + /* TODO: wait for the actual reply instead */ if (sdb_command_print_reply(input->client) < 0) { if (data) free(data); - return NULL; + data = NULL; } } -- 2.30.2