pidgin: 644d46cc: Update MSN for 64-bit file transfers.

qulogic at pidgin.im qulogic at pidgin.im
Sun Oct 16 04:25:53 EDT 2011


----------------------------------------------------------------------
Revision: 644d46cc49d0ce8b5f7f5a6a517d27ba4f1943b6
Parent:   5143a681a5993c9573b38887234214d9336297e4
Author:   qulogic at pidgin.im
Date:     10/16/11 03:01:52
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/644d46cc49d0ce8b5f7f5a6a517d27ba4f1943b6

Changelog: 

Update MSN for 64-bit file transfers.

Refs #8477.

Changes against parent 5143a681a5993c9573b38887234214d9336297e4

  patched  libpurple/protocols/msn/slp.c
  patched  libpurple/protocols/msn/slpcall.c
  patched  libpurple/protocols/msn/slpmsg.c
  patched  libpurple/protocols/msn/slpmsg.h

-------------- next part --------------
============================================================
--- libpurple/protocols/msn/slp.c	1294fbf257e089b8308a8e165405fb0b98f04f1c
+++ libpurple/protocols/msn/slp.c	f5bee17cef81f6a9dccebbcc5e1c793cdc00e5f2
@@ -291,7 +291,7 @@ gen_context(PurpleXfer *xfer, const char
 static gchar *
 gen_context(PurpleXfer *xfer, const char *file_name, const char *file_path)
 {
-	gsize size = 0;
+	goffset size = 0;
 	MsnFileContext context;
 	gchar *u8 = NULL;
 	gchar *ret;
============================================================
--- libpurple/protocols/msn/slpcall.c	91b91fbeabd1850abecab10bbf4d2986e525e857
+++ libpurple/protocols/msn/slpcall.c	7ec33fbce2fa84f8d059fb65b1a91e68256fe6bd
@@ -512,7 +512,6 @@ got_sessionreq(MsnSlpCall *slpcall, cons
 		MsnFileContext *file_context;
 		char *buf;
 		gsize bin_len;
-		guint32 file_size;
 		char *file_name;
 
 		account = slpcall->slplink->session->account;
@@ -529,8 +528,6 @@ got_sessionreq(MsnSlpCall *slpcall, cons
 		file_context = msn_file_context_from_wire(buf, bin_len);
 
 		if (file_context != NULL) {
-			file_size = file_context->file_size;
-
 			file_name = g_convert((const gchar *)&file_context->file_name,
 			                      MAX_FILE_NAME_LEN * 2,
 			                      "UTF-8", "UTF-16LE",
@@ -538,7 +535,7 @@ got_sessionreq(MsnSlpCall *slpcall, cons
 
 			purple_xfer_set_filename(xfer, file_name ? file_name : "");
 			g_free(file_name);
-			purple_xfer_set_size(xfer, file_size);
+			purple_xfer_set_size(xfer, file_context->file_size);
 			purple_xfer_set_init_fnc(xfer, msn_xfer_init);
 			purple_xfer_set_request_denied_fnc(xfer, msn_xfer_cancel);
 			purple_xfer_set_cancel_recv_fnc(xfer, msn_xfer_cancel);
============================================================
--- libpurple/protocols/msn/slpmsg.c	0698820d787f33ab443f6e6134b08f9b346f9b3f
+++ libpurple/protocols/msn/slpmsg.c	be6f13130e77323d88cc0961c69d738876753ac4
@@ -239,7 +239,7 @@ MsnSlpMessage *msn_slpmsg_dataprep_new(M
 
 }
 
-MsnSlpMessage *msn_slpmsg_file_new(MsnSlpCall *slpcall, size_t size)
+MsnSlpMessage *msn_slpmsg_file_new(MsnSlpCall *slpcall, goffset size)
 {
 	MsnSlpMessage *slpmsg;
 
============================================================
--- libpurple/protocols/msn/slpmsg.h	4a85ea8244a35459680a62cc74dc168ba1c2d4ed
+++ libpurple/protocols/msn/slpmsg.h	2f67320f3c1efb7746733bac8beff89bb73836bd
@@ -133,7 +133,7 @@ MsnSlpMessage *msn_slpmsg_dataprep_new(M
  *
  * @return A new SlpMessage with the file transfer info.
  */
-MsnSlpMessage *msn_slpmsg_file_new(MsnSlpCall *slpcall, size_t size);
+MsnSlpMessage *msn_slpmsg_file_new(MsnSlpCall *slpcall, goffset size);
 
 /**
  * Serialize the MsnSlpMessage in a way it can be used to be transmited


More information about the Commits mailing list