From: Andre Noll Date: Mon, 29 Sep 2008 09:09:59 +0000 (+0200) Subject: Fix com_init. X-Git-Tag: v0.3.3~48 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=f37c5c599f5a858a44df7739613d55aeea078921 Fix com_init. Dooh. The init command always produces output, so we have to pass a pointer to send_result() as the result handler and the fd to send data to. Thanks to Johannes Wörner for pointing out this rather embarrassing bug. --- diff --git a/NEWS b/NEWS index 684485cf..6eccc8af 100644 --- a/NEWS +++ b/NEWS @@ -17,6 +17,7 @@ amplification filter. - new status item/database entry: amplification. It is used by the amp filter to pre-amplify the audio stream. - fix a close-without-open bug in para_write. + - fix a bug in com_init() which was introduced in 0.3.2. ----------------------------------------- 0.3.2 (2008-04-11) "probabilistic parity" diff --git a/afs.c b/afs.c index 64d3b0f8..aa008f99 100644 --- a/afs.c +++ b/afs.c @@ -1105,7 +1105,7 @@ int com_init(int fd, int argc, char * const * const argv) return -E_BAD_TABLE_NAME; } } - ret = send_callback_request(create_tables_callback, &query, NULL, NULL); + ret = send_callback_request(create_tables_callback, &query, &send_result, &fd); if (ret < 0) return send_va_buffer(fd, "%s\n", para_strerror(-ret)); return ret;