=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/sftp-client.c,v retrieving revision 1.145 retrieving revision 1.146 diff -u -r1.145 -r1.146 --- src/usr.bin/ssh/sftp-client.c 2021/08/07 00:02:41 1.145 +++ src/usr.bin/ssh/sftp-client.c 2021/08/07 00:07:18 1.146 @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp-client.c,v 1.145 2021/08/07 00:02:41 djm Exp $ */ +/* $OpenBSD: sftp-client.c,v 1.146 2021/08/07 00:07:18 djm Exp $ */ /* * Copyright (c) 2001-2004 Damien Miller * @@ -86,6 +86,15 @@ struct bwlimit bwlimit_in, bwlimit_out; }; +/* Tracks in-progress requests during file transfers */ +struct request { + u_int id; + size_t len; + u_int64_t offset; + TAILQ_ENTRY(request) tq; +}; +TAILQ_HEAD(requests, request); + static u_char * get_handle(struct sftp_conn *conn, u_int expected_id, size_t *len, const char *errfmt, ...) __attribute__((format(printf, 4, 5))); @@ -1325,13 +1334,7 @@ off_t progress_counter; size_t handle_len; struct stat st; - struct request { - u_int id; - size_t len; - u_int64_t offset; - TAILQ_ENTRY(request) tq; - }; - TAILQ_HEAD(reqhead, request) requests; + struct requests requests; struct request *req; u_char type; @@ -2108,13 +2111,7 @@ off_t progress_counter; u_char *from_handle, *to_handle; size_t from_handle_len, to_handle_len; - struct request { - u_int id; - size_t len; - u_int64_t offset; - TAILQ_ENTRY(request) tq; - }; - TAILQ_HEAD(reqhead, request) requests; + struct requests requests; struct request *req; u_char type;