From bba90846072424cde3afec679fedec706cb4f005 Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Thu, 24 Apr 2014 09:20:19 +0200 Subject: [PATCH] frontend: Clear the error buffer when initializing a new command. --- src/frontend/connection.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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)); -- 2.30.2