pidgin: f0f3e38f: Update Bonjour for 64-bit file transfers...
qulogic at pidgin.im
qulogic at pidgin.im
Sun Oct 16 04:26:14 EDT 2011
----------------------------------------------------------------------
Revision: f0f3e38fc3b9214c39a0e413f9d2ff5666a389c7
Parent: 99bc79c8229d3feccd5211b2263e4ea5215b3f62
Author: qulogic at pidgin.im
Date: 10/16/11 02:12:25
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/f0f3e38fc3b9214c39a0e413f9d2ff5666a389c7
Changelog:
Update Bonjour for 64-bit file transfers.
Refs #8477.
Changes against parent 99bc79c8229d3feccd5211b2263e4ea5215b3f62
patched libpurple/protocols/bonjour/bonjour_ft.c
-------------- next part --------------
============================================================
--- libpurple/protocols/bonjour/bonjour_ft.c f23c490839f68136278bd42d781ffa5c8ed06bcc
+++ libpurple/protocols/bonjour/bonjour_ft.c c1c0667e92e2c3d7fb576ced836140404cdc13fe
@@ -38,7 +38,7 @@ bonjour_xfer_receive(PurpleConnection *p
bonjour_xfer_init(PurpleXfer *xfer);
static void
bonjour_xfer_receive(PurpleConnection *pc, const char *id, const char *sid, const char *from,
- const int filesize, const char *filename, int option);
+ const goffset filesize, const char *filename, int option);
static void bonjour_free_xfer(PurpleXfer *xfer);
/* Look for specific xfer handle */
@@ -211,7 +211,7 @@ xep_ft_si_offer(PurpleXfer *xfer, const
file = xmlnode_new_child(si_node, "file");
xmlnode_set_namespace(file, "http://jabber.org/protocol/si/profile/file-transfer");
xmlnode_set_attrib(file, "name", purple_xfer_get_filename(xfer));
- g_snprintf(buf, sizeof(buf), "%" G_GSIZE_FORMAT, purple_xfer_get_size(xfer));
+ g_snprintf(buf, sizeof(buf), "%" G_GOFFSET_FORMAT, purple_xfer_get_size(xfer));
xmlnode_set_attrib(file, "size", buf);
feature = xmlnode_new_child(si_node, "feature");
@@ -439,7 +439,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");
@@ -447,7 +447,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 */
@@ -576,7 +576,7 @@ bonjour_xfer_receive(PurpleConnection *p
static void
bonjour_xfer_receive(PurpleConnection *pc, const char *id, const char *sid, const char *from,
- const int filesize, const char *filename, int option)
+ const goffset filesize, const char *filename, int option)
{
PurpleXfer *xfer;
XepXfer *xf;
More information about the Commits
mailing list