pidgin: b09159d6: Convert the msn prpl to use the new API.
andrew.victor at mxit.com
andrew.victor at mxit.com
Fri Aug 26 17:31:06 EDT 2011
----------------------------------------------------------------------
Revision: b09159d6058e5a29e69edb3a922d6968ca034409
Parent: cf1b7bfcd02c5eb0f8d46d5213f6484e1a89c023
Author: andrew.victor at mxit.com
Date: 08/26/11 14:37:27
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/b09159d6058e5a29e69edb3a922d6968ca034409
Changelog:
Convert the msn prpl to use the new API.
Changes against parent cf1b7bfcd02c5eb0f8d46d5213f6484e1a89c023
patched libpurple/protocols/msn/msn.c
patched libpurple/protocols/msn/slp.c
patched libpurple/protocols/msn/slpcall.c
patched libpurple/protocols/msn/slplink.c
patched libpurple/protocols/msn/xfer.c
-------------- next part --------------
============================================================
--- libpurple/protocols/msn/msn.c 90d1a419a46e9141a2df047fd7828bd59eeae49b
+++ libpurple/protocols/msn/msn.c a988b0664cdf7671473846794b5c53dd0b67f9a6
@@ -869,7 +869,7 @@ t_msn_xfer_cancel_send(PurpleXfer *xfer)
static void
t_msn_xfer_cancel_send(PurpleXfer *xfer)
{
- MsnSlpLink *slplink = xfer->data;
+ MsnSlpLink *slplink = purple_xfer_get_protocol_data(xfer);
msn_slplink_unref(slplink);
}
@@ -885,7 +885,7 @@ msn_new_xfer(PurpleConnection *gc, const
g_return_val_if_fail(xfer != NULL, NULL);
- xfer->data = msn_slplink_ref(msn_session_get_slplink(session, who));
+ purple_xfer_set_protocol_data(xfer, msn_slplink_ref(msn_session_get_slplink(session, who)));
purple_xfer_set_init_fnc(xfer, t_msn_xfer_init);
purple_xfer_set_cancel_send_fnc(xfer, t_msn_xfer_cancel_send);
============================================================
--- libpurple/protocols/msn/slp.c 1b96a2bb84d01ea73ca3b71579df4a3841244f0d
+++ libpurple/protocols/msn/slp.c 926f0935ab765c18c94c14a35c903c0eec24fd30
@@ -364,7 +364,7 @@ msn_request_ft(PurpleXfer *xfer)
fn = purple_xfer_get_filename(xfer);
fp = purple_xfer_get_local_filename(xfer);
- slplink = xfer->data;
+ slplink = purple_xfer_get_protocol_data(xfer);
g_return_if_fail(slplink != NULL);
g_return_if_fail(fp != NULL);
@@ -384,7 +384,7 @@ msn_request_ft(PurpleXfer *xfer)
purple_xfer_set_read_fnc(xfer, msn_xfer_read);
purple_xfer_set_write_fnc(xfer, msn_xfer_write);
- xfer->data = slpcall;
+ purple_xfer_set_protocol_data(xfer, slpcall);
context = gen_context(xfer, fn, fp);
============================================================
--- libpurple/protocols/msn/slpcall.c cebfaa918ffb28c9fd14de096ab241e8247d53c9
+++ libpurple/protocols/msn/slpcall.c 81222090de971b50bbcd46307830a333c68ac231
@@ -113,7 +113,7 @@ msn_slpcall_destroy(MsnSlpCall *slpcall)
if (slpcall->xfer != NULL) {
if (purple_xfer_get_type(slpcall->xfer) == PURPLE_XFER_RECEIVE)
g_byte_array_free(slpcall->u.incoming_data, TRUE);
- slpcall->xfer->data = NULL;
+ purple_xfer_set_protocol_data(slpcall->xfer, NULL);
purple_xfer_unref(slpcall->xfer);
}
@@ -550,7 +550,7 @@ got_sessionreq(MsnSlpCall *slpcall, cons
slpcall->xfer = xfer;
purple_xfer_ref(slpcall->xfer);
- xfer->data = slpcall;
+ purple_xfer_set_protocol_data(xfer, slpcall);
if (file_context->preview) {
purple_xfer_set_thumbnail(xfer, file_context->preview,
============================================================
--- libpurple/protocols/msn/slplink.c 50b0eaf0d91d344af8f71eb71216e4b8c55d54c7
+++ libpurple/protocols/msn/slplink.c a1ef23e2a474ebbb24a3e63129e4cd3a380c85e9
@@ -465,7 +465,7 @@ init_first_msg(MsnSlpLink *slplink, MsnP
purple_xfer_ref(xfer);
purple_xfer_start(xfer, -1, NULL, 0);
- if (xfer->data == NULL) {
+ if (purple_xfer_get_protocol_data(xfer) == NULL) {
purple_xfer_unref(xfer);
msn_slpmsg_destroy(slpmsg);
g_return_val_if_reached(NULL);
============================================================
--- libpurple/protocols/msn/xfer.c d8541455da494f7df015ae5d64a0f398af567d89
+++ libpurple/protocols/msn/xfer.c 9fa6df0648c8b8ac1e3ffe347da8aba971e76652
@@ -42,7 +42,7 @@ msn_xfer_init(PurpleXfer *xfer)
purple_debug_info("msn", "xfer_init\n");
- slpcall = xfer->data;
+ slpcall = purple_xfer_get_protocol_data(xfer);
/* Send Ok */
content = g_strdup_printf("SessionID: %lu\r\n\r\n",
@@ -62,9 +62,9 @@ msn_xfer_cancel(PurpleXfer *xfer)
char *content;
g_return_if_fail(xfer != NULL);
- g_return_if_fail(xfer->data != NULL);
- slpcall = xfer->data;
+ slpcall = purple_xfer_get_protocol_data(xfer);
+ g_return_if_fail(slpcall != NULL);
if (purple_xfer_get_status(xfer) == PURPLE_XFER_STATUS_CANCEL_LOCAL)
{
@@ -102,7 +102,7 @@ msn_xfer_write(const guchar *data, gsize
g_return_val_if_fail(purple_xfer_get_type(xfer) == PURPLE_XFER_SEND, -1);
- slpcall = xfer->data;
+ slpcall = purple_xfer_get_protocol_data(xfer);
/* Not sure I trust it'll be there */
g_return_val_if_fail(slpcall != NULL, -1);
@@ -126,7 +126,7 @@ msn_xfer_read(guchar **data, PurpleXfer
g_return_val_if_fail(purple_xfer_get_type(xfer) == PURPLE_XFER_RECEIVE, -1);
- slpcall = xfer->data;
+ slpcall = purple_xfer_get_protocol_data(xfer);
/* Not sure I trust it'll be there */
g_return_val_if_fail(slpcall != NULL, -1);
More information about the Commits
mailing list