From: Sebastian Harl Date: Wed, 23 Apr 2014 21:09:28 +0000 (+0200) Subject: frontend: Always store errors in the error buffer. X-Git-Tag: sysdb-0.1.0~90 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=8a31c48d45ca91ea723e73c339cc1885f488d9fa;p=sysdb.git frontend: Always store errors in the error buffer. This allows to access the error from other parts of the code. --- 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;