diff options
author | Jeremy Allison <jra@samba.org> | 2000-10-28 20:54:45 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2000-10-28 20:54:45 +0000 |
commit | e2d1dd47d8f873a10d8f84253182059c50a229c8 (patch) | |
tree | fbb26fdb2370d5b030eddd42038f9df00669f2f1 /source3 | |
parent | 1cb444057a7894ca97706fb65a756e5fdb635f81 (diff) | |
download | samba-e2d1dd47d8f873a10d8f84253182059c50a229c8.tar.gz samba-e2d1dd47d8f873a10d8f84253182059c50a229c8.tar.xz samba-e2d1dd47d8f873a10d8f84253182059c50a229c8.zip |
Another patch to fix cli_reestablish_connection from Kenichi Okuyama@Tokyo Research Lab. IBM-Japan. Co. Jp.
Jeremy.
(This used to be commit 06f5da5d4bf044969364afe0298347811fb4ae91)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/libsmb/cliconnect.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c index c4b491b0561..3292b9e1d66 100644 --- a/source3/libsmb/cliconnect.c +++ b/source3/libsmb/cliconnect.c @@ -626,10 +626,8 @@ BOOL cli_reestablish_connection(struct cli_state *cli) dest_host, &cli->dest_ip, &calling, &called, share, dev, False, do_tcon)) { - if (cli->fd != oldfd) { - if (dup2(cli->fd, oldfd) == oldfd) { - close(cli->fd); - } + if ((cli->fd != oldfd) && (oldfd != -1)) { + close( oldfd ); } return True; } |