diff options
author | Gerald Carter <jerry@samba.org> | 2002-05-14 14:01:47 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2002-05-14 14:01:47 +0000 |
commit | 615e6071945ebb4f89cdb897659e8f2956349a1b (patch) | |
tree | ccc6e725e11f12bfe8d3a676cac8841247170d4d /source3/client | |
parent | af451af22f745d56bb92f0dbdd270f7fd024ef0d (diff) | |
download | samba-615e6071945ebb4f89cdb897659e8f2956349a1b.tar.gz samba-615e6071945ebb4f89cdb897659e8f2956349a1b.tar.bz2 samba-615e6071945ebb4f89cdb897659e8f2956349a1b.zip |
segfault fix merged from SAMBA_2_2
(This used to be commit d3388d195308cf7fba83734424e78b5248786af5)
Diffstat (limited to 'source3/client')
-rw-r--r-- | source3/client/client.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/source3/client/client.c b/source3/client/client.c index 1daba28b98..0630bbb44b 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -2080,6 +2080,14 @@ static int process_command_string(char *cmd) char *ptr; int rc = 0; + /* establish the connection if not already */ + + if (!cli) { + cli = do_connect(desthost, service); + if (!cli) + return; + } + while (cmd[0] != '\0') { char *p; fstring tok; @@ -2484,9 +2492,13 @@ handle a tar operation static int do_tar_op(char *base_directory) { int ret; - cli = do_connect(desthost, service); - if (!cli) - return 1; + + /* do we already have a connection? */ + if (!cli) { + cli = do_connect(desthost, service); + if (!cli) + return 1; + } recurse=True; |