gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnurl] 131/411: imap: set cselect_bits to CURL_CSELECT_IN initially


From: gnunet
Subject: [gnurl] 131/411: imap: set cselect_bits to CURL_CSELECT_IN initially
Date: Wed, 13 Jan 2021 01:19:06 +0100

This is an automated email from the git hooks/post-receive script.

nikita pushed a commit to branch master
in repository gnurl.

commit da5ae38db0642dc6f676217a7d77119cda4cce5a
Author: Antarpreet Singh <antarpreet.singh@gmail.com>
AuthorDate: Fri May 8 00:50:26 2020 +0530

    imap: set cselect_bits to CURL_CSELECT_IN initially
    
    ... when continuing a transfer from a FETCH response.
    
    When the size of the file was small enough that the entirety of the
    transfer happens in a single go and schannel buffers holds the entire
    data. However, it wasn't completely read in Curl_pp_readresp since a
    line break was found before that could happen. So, by the time we are in
    imap_state_fetch_resp - there's data in buffers that needs to be read
    via Curl_read but nothing to read from the socket. After we setup a
    transfer (Curl_setup_transfer), curl just waits on the socket state to
    change - which doesn't happen since no new data ever comes.
    
    Closes #5961
---
 lib/imap.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/imap.c b/lib/imap.c
index cad0e5908..39aa0af33 100644
--- a/lib/imap.c
+++ b/lib/imap.c
@@ -1176,6 +1176,9 @@ static CURLcode imap_state_fetch_resp(struct connectdata 
*conn, int imapcode,
     else {
       /* IMAP download */
       data->req.maxdownload = size;
+      /* force a recv/send check of this connection, as the data might've been
+       read off the socket already */
+      data->conn->cselect_bits = CURL_CSELECT_IN;
       Curl_setup_transfer(data, FIRSTSOCKET, size, FALSE, -1);
     }
   }

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]