From: Sebastian Harl Date: Thu, 11 Dec 2014 08:44:35 +0000 (+0100) Subject: sysdb: Clear the current command from the buffer after error. X-Git-Tag: sysdb-0.7.0~112^2~9 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=27fe085f873c0cc0991a6f34cc0342c0f66e7af7;p=sysdb.git sysdb: Clear the current command from the buffer after error. --- 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; } }