From: Andre Noll Date: Sun, 11 Dec 2011 19:24:53 +0000 (+0100) Subject: com_init(): Return proper error code. X-Git-Tag: v0.4.10~23 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=fb87f827a783a42a9292cc434c61b0fc9e67af45 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. --- 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; }