From: Sebastian Harl Date: Thu, 24 Apr 2014 07:20:19 +0000 (+0200) Subject: frontend: Clear the error buffer when initializing a new command. X-Git-Tag: sysdb-0.1.0~87 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=bba90846072424cde3afec679fedec706cb4f005;p=sysdb.git frontend: Clear the error buffer when initializing a new command. --- diff --git a/src/frontend/connection.c b/src/frontend/connection.c index 8d7123a..3d28841 100644 --- a/src/frontend/connection.c +++ b/src/frontend/connection.c @@ -271,9 +271,6 @@ command_handle(sdb_conn_t *conn) return -1; } - /* reset */ - sdb_strbuf_sprintf(conn->errbuf, ""); - switch (conn->cmd) { case CONNECTION_PING: status = sdb_connection_ping(conn); @@ -371,6 +368,9 @@ command_init(sdb_conn_t *conn) assert(conn && (conn->cmd == CONNECTION_IDLE) && (! conn->cmd_len)); + /* reset */ + sdb_strbuf_sprintf(conn->errbuf, ""); + conn->cmd = connection_get_int32(conn, 0); conn->cmd_len = connection_get_int32(conn, sizeof(uint32_t));