Fix hang when completing a file transfer over XMPP

Review Request #1466 — Created May 21, 2022 and submitted

Information

pidgin/pidgin
release-2.x.y

Reviewers

The way purple_xfer_drain_socket was implemented,
if the peer never close()d the connection, we would
wait forever for it to be closed remotely, causing
Pidgin to hang.

Tested IRC and XMPP on Windows and Linux. Transferred big and small files.

Summary ID
Fix hang when completing a file transfer over XMPP
The way purple_xfer_drain_socket was implemented, if the peer never close()d the connection, we would wait forever for it to be closed remotely, causing Pidgin to hang. Testing Done: Tested IRC and XMPP on Windows and Linux. Transferred big and small files. Reviewed at https://reviews.imfreedom.org/r/1466/
613b2af77c7a0e32abda71c2bb9eb14942c076f9
Description From Last Updated

extra whitespace

grimgrim

{'s please

grimgrim

Can you comment a bit on exactly what you're testing for in each of these conditionals? Like I know it's …

grimgrim

operators should have whitespace around them.

grimgrim

whitespace around the + again.

grimgrim
belgin
grim
  1. 
      
  2. libpurple/protocols/irc/dcc_send.c (Diff revision 2)
     
     
    Show all issues

    extra whitespace

  3. libpurple/protocols/irc/dcc_send.c (Diff revision 2)
     
     
    Show all issues

    {'s please

  4. libpurple/protocols/irc/dcc_send.c (Diff revision 2)
     
     
    Show all issues

    Can you comment a bit on exactly what you're testing for in each of these conditionals? Like I know it's how many bytes were read, but like a little more explanation wouldn't hurt especially around the r == 0 block.

  5. 
      
belgin
grim
  1. 
      
  2. libpurple/ft.c (Diff revision 3)
     
     
    Show all issues

    operators should have whitespace around them.

  3. libpurple/ft.c (Diff revision 3)
     
     
    Show all issues

    whitespace around the + again.

  4. 
      
belgin
grim
  1. Ship It!
  2. Awesome work, thank you very much!!

  3. 
      
grim
Review request changed
Status:
Completed