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.
This commit is contained in:
Daniel Stenberg 2012-05-10 23:08:23 +02:00
parent ad63fc2df6
commit 1e15075a8e

View File

@ -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);