/pidgin/main: 9fcc56d42417: bonjour: Fix large file transfers (>...

Linus L?ssing linus.luessing at web.de
Sat Jan 19 11:12:01 EST 2013


Changeset: 9fcc56d42417a4f0045d2b7eb13247c5e94ecdd8
Author:	 Linus L?ssing <linus.luessing at web.de>
Date:	 2013-01-19 15:57 +0000
Branch:	 release-2.x.y
URL: http://hg.pidgin.im/pidgin/main/rev/9fcc56d42417

Description:

bonjour: Fix large file transfers (> 4GiB) with a 64-bit libpurple.

Linus came up with this fix, and Daniel Atallah tweaked it to backport part of
3dea6a2d1e61789203c57800483df059b04fba4f, which contains a more complete (but
API breaking) fix.

Fixes #15421

diffstat:

 libpurple/protocols/bonjour/bonjour_ft.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (21 lines):

diff --git a/libpurple/protocols/bonjour/bonjour_ft.c b/libpurple/protocols/bonjour/bonjour_ft.c
--- a/libpurple/protocols/bonjour/bonjour_ft.c
+++ b/libpurple/protocols/bonjour/bonjour_ft.c
@@ -440,7 +440,7 @@ xep_si_parse(PurpleConnection *pc, xmlno
 		if (si && (profile = xmlnode_get_attrib(si, "profile"))
 				&& !strcmp(profile, "http://jabber.org/protocol/si/profile/file-transfer")) {
 			const char *filename = NULL, *filesize_str = NULL;
-			int filesize = 0;
+			goffset filesize = 0;
 			xmlnode *file;
 
 			const char *sid = xmlnode_get_attrib(si, "id");
@@ -448,7 +448,7 @@ xep_si_parse(PurpleConnection *pc, xmlno
 			if ((file = xmlnode_get_child(si, "file"))) {
 				filename = xmlnode_get_attrib(file, "name");
 				if((filesize_str = xmlnode_get_attrib(file, "size")))
-					filesize = atoi(filesize_str);
+					filesize = g_ascii_strtoll(filesize_str, NULL, 10);
 			}
 
 			/* TODO: Make sure that it is advertising a bytestreams transfer */



More information about the Commits mailing list