pidgin/gtkmedia.h

Fri, 15 Apr 2022 13:21:50 -0500

author
Belgin Știrbu <belginstirbu@hotmail.com>
date
Fri, 15 Apr 2022 13:21:50 -0500
branch
release-2.x.y
changeset 41327
82f6b5267eac
parent 28345
57a838c454b0
child 35451
206524351826
permissions
-rw-r--r--

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/

19886
84cef48efbc5 Missing files
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
1 /**
26740
e715fa3fa4fa Fix doxygen tags.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26503
diff changeset
2 * @file gtkmedia.h Pidgin Media API
e715fa3fa4fa Fix doxygen tags.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26503
diff changeset
3 * @ingroup pidgin
e715fa3fa4fa Fix doxygen tags.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26503
diff changeset
4 */
e715fa3fa4fa Fix doxygen tags.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26503
diff changeset
5
e715fa3fa4fa Fix doxygen tags.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 26503
diff changeset
6 /* Pidgin
19886
84cef48efbc5 Missing files
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
7 *
84cef48efbc5 Missing files
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
8 * Pidgin is the legal property of its developers, whose names are too numerous
84cef48efbc5 Missing files
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
9 * to list here. Please refer to the COPYRIGHT file distributed with this
84cef48efbc5 Missing files
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
10 * source distribution.
84cef48efbc5 Missing files
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
11 *
84cef48efbc5 Missing files
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
12 * This program is free software; you can redistribute it and/or modify
84cef48efbc5 Missing files
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
13 * it under the terms of the GNU General Public License as published by
84cef48efbc5 Missing files
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
14 * the Free Software Foundation; either version 2 of the License, or
84cef48efbc5 Missing files
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
15 * (at your option) any later version.
84cef48efbc5 Missing files
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
16 *
84cef48efbc5 Missing files
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
17 * This program is distributed in the hope that it will be useful,
84cef48efbc5 Missing files
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
84cef48efbc5 Missing files
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
84cef48efbc5 Missing files
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
20 * GNU General Public License for more details.
84cef48efbc5 Missing files
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
21 *
84cef48efbc5 Missing files
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
22 * You should have received a copy of the GNU General Public License
84cef48efbc5 Missing files
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
23 * along with this program; if not, write to the Free Software
28345
57a838c454b0 Oops, Elliott correctly pointed out this was wrong...
Paul Aurich <darkrain42@pidgin.im>
parents: 28323
diff changeset
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
19886
84cef48efbc5 Missing files
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
25 */
84cef48efbc5 Missing files
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
26
84cef48efbc5 Missing files
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
27 #ifndef __GTKMEDIA_H_
84cef48efbc5 Missing files
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
28 #define __GTKMEDIA_H_
84cef48efbc5 Missing files
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
29
84cef48efbc5 Missing files
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
30 G_BEGIN_DECLS
84cef48efbc5 Missing files
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
31
26269
cacc598079e4 Separate PidginMedia from PidginConversation.
Michael Ruprecht <maiku@pidgin.im>
parents: 26255
diff changeset
32 void pidgin_medias_init(void);
cacc598079e4 Separate PidginMedia from PidginConversation.
Michael Ruprecht <maiku@pidgin.im>
parents: 26255
diff changeset
33
19886
84cef48efbc5 Missing files
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
34 G_END_DECLS
84cef48efbc5 Missing files
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
35
84cef48efbc5 Missing files
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
36 #endif /* __GTKMEDIA_H_ */

mercurial