Code

sysdb: Clear the current command from the buffer after error.
authorSebastian Harl <sh@tokkee.org>
Thu, 11 Dec 2014 08:44:35 +0000 (09:44 +0100)
committerSebastian Harl <sh@tokkee.org>
Thu, 11 Dec 2014 08:44:35 +0000 (09:44 +0100)
src/tools/sysdb/command.c

index 1436618..7737a2e 100644 (file)
@@ -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;
                }
        }