gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [gnurl] 18/153: smb_getsock: always wait for write socket t


From: gnunet
Subject: [GNUnet-SVN] [gnurl] 18/153: smb_getsock: always wait for write socket too
Date: Tue, 11 Sep 2018 12:51:29 +0200

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

ng0 pushed a commit to branch master
in repository gnurl.

commit 73af7bcd617a8c0312bd8a083daa5a8fad2c794e
Author: Daniel Stenberg <address@hidden>
AuthorDate: Fri Jul 20 00:57:28 2018 +0200

    smb_getsock: always wait for write socket too
    
    ... the protocol is doing read/write a lot, so it needs to write often
    even when downloading. A more proper fix could check for eactly when it
    wants to write and only ask for it then.
    
    Without this fix, an SMB download could easily get stuck when the 
event-driven
    API was used.
    
    Closes #2768
---
 lib/smb.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/lib/smb.c b/lib/smb.c
index fad636252..9ab8710ce 100644
--- a/lib/smb.c
+++ b/lib/smb.c
@@ -941,17 +941,11 @@ static CURLcode smb_disconnect(struct connectdata *conn, 
bool dead)
 static int smb_getsock(struct connectdata *conn, curl_socket_t *socks,
                        int numsocks)
 {
-  struct smb_conn *smbc = &conn->proto.smbc;
-
   if(!numsocks)
     return GETSOCK_BLANK;
 
   socks[0] = conn->sock[FIRSTSOCKET];
-
-  if(smbc->send_size || smbc->upload_size)
-    return GETSOCK_WRITESOCK(0);
-
-  return GETSOCK_READSOCK(0);
+  return GETSOCK_READSOCK(0) | GETSOCK_WRITESOCK(0);
 }
 
 static CURLcode smb_parse_url_path(struct connectdata *conn)

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

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