]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
Fix com_init.
authorAndre Noll <maan@systemlinux.org>
Mon, 29 Sep 2008 09:09:59 +0000 (11:09 +0200)
committerAndre Noll <maan@systemlinux.org>
Mon, 29 Sep 2008 09:14:39 +0000 (11:14 +0200)
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
afs.c

diff --git a/NEWS b/NEWS
index 684485cf0bef753424750e45128dbe866439c093..6eccc8af9c828651518522732f93d3dc306bd5eb 100644 (file)
--- 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.
        - 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"
 
 -----------------------------------------
 0.3.2 (2008-04-11) "probabilistic parity"
diff --git a/afs.c b/afs.c
index 64d3b0f82fb9005b9e526d7ff3265640d3777114..aa008f995c6d7aa8cc0b935c419810c81749613e 100644 (file)
--- 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;
                }
        }
                                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;
        if (ret < 0)
                return send_va_buffer(fd, "%s\n", para_strerror(-ret));
        return ret;