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 143661868d49204c9436bdd2e370a1346881df71..7737a2e15e35e6c9084227669f6f40471ea463e3 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). */
                 * 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);
                if (sdb_command_print_reply(input->client) < 0) {
                        if (data)
                                free(data);
-                       return NULL;
+                       data = NULL;
                }
        }
 
                }
        }