From 927f00cc19b7239a1fe12abe30b472d61b753d8d Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 9 Jun 2023 21:40:16 +0300 Subject: fixes #3551 (Update libssh2 to 1.11.0) --- libs/libssh2/src/sftp.h | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'libs/libssh2/src/sftp.h') diff --git a/libs/libssh2/src/sftp.h b/libs/libssh2/src/sftp.h index ae4162f10f..647ddbc007 100644 --- a/libs/libssh2/src/sftp.h +++ b/libs/libssh2/src/sftp.h @@ -1,8 +1,8 @@ -#ifndef _LIBSSH2_SFTP_H -#define _LIBSSH2_SFTP_H +#ifndef __LIBSSH2_SFTP_H +#define __LIBSSH2_SFTP_H /* - * Copyright (C) 2010 - 2012 by Daniel Stenberg - * Author: Daniel Stenberg + * Copyright (C) Daniel Stenberg + * All rights reserved. * * Redistribution and use in source and binary forms, * with or without modification, are permitted provided @@ -37,6 +37,7 @@ * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY * OF SUCH DAMAGE. * + * SPDX-License-Identifier: BSD-3-Clause */ /* @@ -67,10 +68,6 @@ struct sftp_zombie_requests { uint32_t request_id; }; -#ifndef MIN -#define MIN(x,y) ((x)<(y)?(x):(y)) -#endif - struct _LIBSSH2_SFTP_PACKET { struct list_node node; /* linked list header */ @@ -153,9 +150,10 @@ struct _LIBSSH2_SFTP uint32_t last_errno; /* Holder for partial packet, use in libssh2_sftp_packet_read() */ - unsigned char partial_size[4]; /* buffer for size field */ - size_t partial_size_len; /* size field length */ - unsigned char *partial_packet; /* The data */ + unsigned char packet_header[9]; + /* packet size (4) packet type (1) request id (4) */ + size_t packet_header_len; /* packet_header length */ + unsigned char *partial_packet; /* The data, with header */ uint32_t partial_len; /* Desired number of bytes */ size_t partial_received; /* Bytes received so far */ @@ -235,4 +233,4 @@ struct _LIBSSH2_SFTP uint32_t symlink_request_id; }; -#endif +#endif /* __LIBSSH2_SFTP_H */ -- cgit v1.2.3