com_init(): Send error message only for non-sideband connections.
authorAndre Noll <maan@systemlinux.org>
Tue, 24 Jul 2012 06:42:23 +0000 (08:42 +0200)
committerAndre Noll <maan@systemlinux.org>
Wed, 25 Jul 2012 17:32:07 +0000 (19:32 +0200)
If com_init() fails, this non-sideband error message is currently
sent also for sideband connections, which confuses the client. Send
it only for non-sideband connections.

afs.c

diff --git a/afs.c b/afs.c
index a1381e7..f1e28f1 100644 (file)
--- a/afs.c
+++ b/afs.c
@@ -1063,7 +1063,7 @@ int com_init(struct command_context *cc)
        }
        ret = send_callback_request(create_tables_callback, &query,
                afs_cb_result_handler, cc);
-       if (ret < 0)
+       if (ret < 0 && !cc->use_sideband)
                /* ignore return value */
                sc_send_va_buffer(&cc->scc, "%s\n", para_strerror(-ret));
        return ret;