From 1e15075a8e1fb4e33602754bd76dce11adb209d4 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 10 May 2012 23:08:23 +0200 Subject: [PATCH] sftp_packetlist_flush: only make it zombie if it was sent The list of outgoing packets may also contain packets that never were sent off and we better not make them zombies too. --- src/sftp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/sftp.c b/src/sftp.c index 047a07bc..300e2abb 100644 --- a/src/sftp.c +++ b/src/sftp.c @@ -430,8 +430,9 @@ static void sftp_packetlist_flush(LIBSSH2_SFTP_HANDLE *handle) int rc; struct sftp_pipeline_chunk *next = _libssh2_list_next(&chunk->node); - /* mark this request as a zombie */ - add_zombie_request(sftp, chunk->request_id); + /* mark this request as a zombie if it ever sent anything */ + if(chunk->sent) + add_zombie_request(sftp, chunk->request_id); rc = sftp_packet_ask(sftp, SSH_FXP_STATUS, chunk->request_id, &data, &data_len);