pidgin/pidgin

Fix file transfers failing at 99% over IRC
release-2.x.y
2022-04-15, Belgin Știrbu
82f6b5267eac
Fix file transfers failing at 99% over IRC

File transfers over IRC sometimes failed because the sender `close()`d the socket before reading everything from it, resulting in a TCP RST packet being sent, which was interpreted by the receiver as a problem with the connection, sometimes dropping the last few bytes of the file as a result.
This patch reads everything from the socket before closing, thus avoiding the RST packet issue.

Testing Done:
Tested on Windows, Linux, Windows-to-Linux and vice-versa IRC file transfers.

Bugs closed: PIDGIN-15893

Reviewed at https://reviews.imfreedom.org/r/1385/
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
datarootdir=@datarootdir@
datadir=@datadir@
sysconfdir=@sysconfdir@
Name: Pidgin (Gaim compatibility)
Description: Pidgin is a GTK2-based instant messenger application.
Version: @VERSION@
Requires: glib-2.0
Cflags: -I${pc_top_builddir}/${pcfiledir}/libpurple -I${pc_top_builddir}/${pcfiledir}/pidgin
Libs: ${pc_top_builddir}/${pcfiledir}/libpurple/libpurple.la