SFTP: request_ids are uint32_t

I went over the code and made sure we use uint32_t all over for the
request_id data. It is an unsigned 32bit value on the wire.
This commit is contained in:
Daniel Stenberg 2010-12-15 09:27:00 +01:00
parent 2f0c0cef76
commit 3faa8bc940
2 changed files with 7 additions and 7 deletions

View File

@ -91,7 +91,7 @@
static int sftp_close_handle(LIBSSH2_SFTP_HANDLE *handle); static int sftp_close_handle(LIBSSH2_SFTP_HANDLE *handle);
static int sftp_packet_ask(LIBSSH2_SFTP *sftp, unsigned char packet_type, static int sftp_packet_ask(LIBSSH2_SFTP *sftp, unsigned char packet_type,
int request_id, unsigned char **data, uint32_t request_id, unsigned char **data,
size_t *data_len); size_t *data_len);
static void sftp_packet_flush(LIBSSH2_SFTP *sftp); static void sftp_packet_flush(LIBSSH2_SFTP *sftp);
@ -297,7 +297,7 @@ static void sftp_packetlist_flush(LIBSSH2_SFTP_HANDLE *handle)
*/ */
static int static int
sftp_packet_ask(LIBSSH2_SFTP *sftp, unsigned char packet_type, sftp_packet_ask(LIBSSH2_SFTP *sftp, unsigned char packet_type,
int request_id, unsigned char **data, uint32_t request_id, unsigned char **data,
size_t *data_len) size_t *data_len)
{ {
LIBSSH2_SESSION *session = sftp->channel->session; LIBSSH2_SESSION *session = sftp->channel->session;
@ -334,7 +334,7 @@ sftp_packet_ask(LIBSSH2_SFTP *sftp, unsigned char packet_type,
*/ */
static int static int
sftp_packet_require(LIBSSH2_SFTP *sftp, unsigned char packet_type, sftp_packet_require(LIBSSH2_SFTP *sftp, unsigned char packet_type,
int request_id, unsigned char **data, uint32_t request_id, unsigned char **data,
size_t *data_len) size_t *data_len)
{ {
LIBSSH2_SESSION *session = sftp->channel->session; LIBSSH2_SESSION *session = sftp->channel->session;
@ -377,7 +377,7 @@ sftp_packet_require(LIBSSH2_SFTP *sftp, unsigned char packet_type,
static int static int
sftp_packet_requirev(LIBSSH2_SFTP *sftp, int num_valid_responses, sftp_packet_requirev(LIBSSH2_SFTP *sftp, int num_valid_responses,
const unsigned char *valid_responses, const unsigned char *valid_responses,
int request_id, unsigned char **data, uint32_t request_id, unsigned char **data,
size_t *data_len) size_t *data_len)
{ {
int i; int i;

View File

@ -67,7 +67,7 @@ struct sftp_pipeline_chunk {
struct _LIBSSH2_SFTP_PACKET struct _LIBSSH2_SFTP_PACKET
{ {
struct list_node node; /* linked list header */ struct list_node node; /* linked list header */
int request_id; uint32_t request_id;
unsigned char *data; unsigned char *data;
size_t data_len; /* payload size */ size_t data_len; /* payload size */
}; };
@ -120,7 +120,7 @@ struct _LIBSSH2_SFTP_HANDLE
/* State variables used in libssh2_sftp_close_handle() */ /* State variables used in libssh2_sftp_close_handle() */
libssh2_nonblocking_states close_state; libssh2_nonblocking_states close_state;
unsigned long close_request_id; uint32_t close_request_id;
unsigned char *close_packet; unsigned char *close_packet;
/* list of outstanding packets sent to server */ /* list of outstanding packets sent to server */
@ -132,7 +132,7 @@ struct _LIBSSH2_SFTP
{ {
LIBSSH2_CHANNEL *channel; LIBSSH2_CHANNEL *channel;
unsigned long request_id, version; uint32_t request_id, version;
struct list_head packets; struct list_head packets;