From fb87f827a783a42a9292cc434c61b0fc9e67af45 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sun, 11 Dec 2011 20:24:53 +0100 Subject: [PATCH] com_init(): Return proper error code. If an error occurred during database initialization, we send an error message to the client. However, it this fails, we currently log the send error rather than the error that caused that initialization to fail. Fix this by logging the root cause of the problem instead. --- afs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/afs.c b/afs.c index ff3c95fe..10f9fa21 100644 --- a/afs.c +++ b/afs.c @@ -1049,7 +1049,8 @@ int com_init(struct stream_cipher_context *scc, int argc, char * const * const a ret = send_callback_request(create_tables_callback, &query, sc_send_result, scc); if (ret < 0) - return sc_send_va_buffer(scc, "%s\n", para_strerror(-ret)); + /* ignore return value */ + sc_send_va_buffer(scc, "%s\n", para_strerror(-ret)); return ret; } -- 2.39.5