From 8a31c48d45ca91ea723e73c339cc1885f488d9fa Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Wed, 23 Apr 2014 23:09:28 +0200 Subject: [PATCH] frontend: Always store errors in the error buffer. This allows to access the error from other parts of the code. --- src/frontend/connection.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/frontend/connection.c b/src/frontend/connection.c index b4f170b..8d7123a 100644 --- a/src/frontend/connection.c +++ b/src/frontend/connection.c @@ -265,6 +265,7 @@ command_handle(sdb_conn_t *conn) if ((! conn->username) && (conn->cmd != CONNECTION_STARTUP)) { const char *errmsg = "Authentication required"; + sdb_strbuf_sprintf(conn->errbuf, errmsg); sdb_connection_send(conn, CONNECTION_ERROR, (uint32_t)strlen(errmsg), errmsg); return -1; -- 2.30.2