From f37c5c599f5a858a44df7739613d55aeea078921 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Mon, 29 Sep 2008 11:09:59 +0200 Subject: [PATCH 1/1] Fix com_init. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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. --- NEWS | 1 + afs.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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; -- 2.39.2