git-imap-send: simplify tunnel construction
PATCH 1/1 git-imap-send: simplify tunnel construction
--- imap-send.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
imap-send.c +2 -3
@@ -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;
Quoted 4 lines · Bernhard Reiter
Signed-off-by Bernhard Reiter <[email protected]>--- imap-send.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
Thanks, this looks obviously correct and is a good direction.
-Peff
Quoted 4 lines · Bernhard Reiter
Signed-off-by Bernhard Reiter <[email protected]>--- imap-send.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
Oy. Where is the patch?
Please avoid multipart/mixed on this list.
Thanks.
Am 2014-08-18 um 19:00 schrieb Junio C Hamano:
Quoted 7 lines
Quoted 4 lines · Bernhard Reiter
Signed-off-by Bernhard Reiter <[email protected]>--- imap-send.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
Quoted 5 lines
Oy. Where is the patch?
Please avoid multipart/mixed on this list.
Thanks.
D'oh. Sorry about that. Strangely, that's what I'm getting from a message created with git-imap-send. Maybe Thunderbird is messing it up afterwards. Anyway:
imap-send.c +0 -0
@@ -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;