diff options
author | Daniel Stenberg <daniel@haxx.se> | 2021-01-25 10:44:30 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2021-01-25 10:46:48 +0100 |
commit | 64634450cdb807ac2bad6261407216e81fb54cce (patch) | |
tree | 66fa677efd015fbb70b5d9062eb024edee96acd6 /lib/vssh/ssh.h | |
parent | ecb13416e316fc1c781f865d2bb7e74462ef793b (diff) | |
download | curl-bagder/libssh2-session-data.tar.gz |
libssh2: move data from connection object to transfer objectbagder/libssh2-session-data
Readdir data, filenames and attributes are strictly related to the
transfer and not the connection. This also reduces the total size of the
fixed connectdata struct.
Diffstat (limited to 'lib/vssh/ssh.h')
-rw-r--r-- | lib/vssh/ssh.h | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/lib/vssh/ssh.h b/lib/vssh/ssh.h index eab2891ce..52e1ee6c2 100644 --- a/lib/vssh/ssh.h +++ b/lib/vssh/ssh.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -111,6 +111,17 @@ typedef enum { struct. */ struct SSHPROTO { char *path; /* the path we operate on */ +#ifdef USE_LIBSSH2 + struct dynbuf readdir_link; + struct dynbuf readdir; + char *readdir_filename; + char *readdir_longentry; + + LIBSSH2_SFTP_ATTRIBUTES quote_attrs; /* used by the SFTP_QUOTE state */ + + /* Here's a set of struct members used by the SFTP_READDIR state */ + LIBSSH2_SFTP_ATTRIBUTES readdir_attrs; +#endif }; /* ssh_conn is used for struct connection-oriented data in the connectdata @@ -167,15 +178,6 @@ struct ssh_conn { const char *readdir_longentry; char *readdir_tmp; #elif defined(USE_LIBSSH2) - struct dynbuf readdir_link; - struct dynbuf readdir; - char *readdir_filename; - char *readdir_longentry; - - LIBSSH2_SFTP_ATTRIBUTES quote_attrs; /* used by the SFTP_QUOTE state */ - - /* Here's a set of struct members used by the SFTP_READDIR state */ - LIBSSH2_SFTP_ATTRIBUTES readdir_attrs; LIBSSH2_SESSION *ssh_session; /* Secure Shell session */ LIBSSH2_CHANNEL *ssh_channel; /* Secure Shell channel handle */ LIBSSH2_SFTP *sftp_session; /* SFTP handle */ |