From: Bernhard Reiter Date: Wed, 13 Aug 2014 17:30:43 +0000 (+0200) Subject: git-imap-send: simplify tunnel construction X-Git-Tag: v2.2.0-rc0~130^2~2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/f9dc5d65ca31cb79893e1296efe37727bf58f3f3?hp=--cc git-imap-send: simplify tunnel construction Signed-off-by: Bernhard Reiter Reviewed-by: Jeff King Signed-off-by: Junio C Hamano --- f9dc5d65ca31cb79893e1296efe37727bf58f3f3 diff --git a/imap-send.c b/imap-send.c index 524fbabc96..fb01a9c9a5 100644 --- a/imap-send.c +++ b/imap-send.c @@ -961,17 +961,16 @@ static struct imap_store *imap_open_store(struct imap_server_conf *srvc) /* open connection to IMAP server */ if (srvc->tunnel) { - const char *argv[] = { srvc->tunnel, NULL }; struct child_process tunnel = {NULL}; imap_info("Starting tunnel '%s'... ", srvc->tunnel); - tunnel.argv = argv; + argv_array_push(&tunnel.args, srvc->tunnel); tunnel.use_shell = 1; tunnel.in = -1; tunnel.out = -1; if (start_command(&tunnel)) - die("cannot start proxy %s", argv[0]); + die("cannot start proxy %s", srvc->tunnel); imap->buf.sock.fd[0] = tunnel.out; imap->buf.sock.fd[1] = tunnel.in;