pidgin: cffb96c5: Convert the oscar prpl to use the new AP...

andrew.victor at mxit.com andrew.victor at mxit.com
Fri Aug 26 17:31:30 EDT 2011


----------------------------------------------------------------------
Revision: cffb96c524da6be56866040e5f072af8f3c05823
Parent:   8d8c5e967f417b9f69f7ab7479301cd227f909ca
Author:   andrew.victor at mxit.com
Date:     08/26/11 15:11:09
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/cffb96c524da6be56866040e5f072af8f3c05823

Changelog: 

Convert the oscar prpl to use the new API.


Changes against parent 8d8c5e967f417b9f69f7ab7479301cd227f909ca

  patched  libpurple/protocols/oscar/oft.c
  patched  libpurple/protocols/oscar/oscar.c
  patched  libpurple/protocols/oscar/peer.c

-------------- next part --------------
============================================================
--- libpurple/protocols/oscar/oscar.c	f88b38ac26f0cdb2d3bcd81cd3627c784e516579
+++ libpurple/protocols/oscar/oscar.c	2ebbcadedd9ca45b5cdf134fd15baea4ac10715a
@@ -5476,7 +5476,7 @@ oscar_new_xfer(PurpleConnection *gc, con
 		conn->flags |= PEER_CONNECTION_FLAG_APPROVED;
 		aim_icbm_makecookie(conn->cookie);
 		conn->xfer = xfer;
-		xfer->data = conn;
+		purple_xfer_set_protocol_data(xfer, conn);
 	}
 
 	return xfer;
============================================================
--- libpurple/protocols/oscar/peer.c	815bc7a8ebfe86c526229a62531dabb0b62e4d0e
+++ libpurple/protocols/oscar/peer.c	78b90138538062b0c42b16aa526416d67de353d5
@@ -212,7 +212,7 @@ peer_connection_destroy_cb(gpointer data
 	if (conn->xfer != NULL)
 	{
 		PurpleXferStatusType status;
-		conn->xfer->data = NULL;
+		purple_xfer_set_protocol_data(conn->xfer, NULL);
 		status = purple_xfer_get_status(conn->xfer);
 		if ((status != PURPLE_XFER_STATUS_DONE) &&
 			(status != PURPLE_XFER_STATUS_CANCEL_LOCAL) &&
@@ -1072,7 +1072,7 @@ peer_connection_got_proposition(OscarDat
 		conn->xfer = purple_xfer_new(account, PURPLE_XFER_RECEIVE, bn);
 		if (conn->xfer)
 		{
-			conn->xfer->data = conn;
+			purple_xfer_set_protocol_data(conn->xfer, conn);
 			purple_xfer_ref(conn->xfer);
 			purple_xfer_set_size(conn->xfer, args->info.sendfile.totsize);
 
============================================================
--- libpurple/protocols/oscar/oft.c	db359a6d029fbd11a74eb0e68bfb1c0732ce6514
+++ libpurple/protocols/oscar/oft.c	dcfd2cd17d30ec0634022f2eb04e3c836e63ca54
@@ -589,7 +589,7 @@ peer_oft_recvcb_init(PurpleXfer *xfer)
 {
 	PeerConnection *conn;
 
-	conn = xfer->data;
+	conn = purple_xfer_get_protocol_data(xfer);
 	conn->flags |= PEER_CONNECTION_FLAG_APPROVED;
 	peer_connection_trynext(conn);
 }
@@ -599,7 +599,7 @@ peer_oft_recvcb_end(PurpleXfer *xfer)
 {
 	PeerConnection *conn;
 
-	conn = xfer->data;
+	conn = purple_xfer_get_protocol_data(xfer);
 
 	/* Tell the other person that we've received everything */
 	conn->fd = conn->xfer->fd;
@@ -617,7 +617,7 @@ peer_oft_recvcb_ack_recv(PurpleXfer *xfe
 	PeerConnection *conn;
 
 	/* Update our rolling checksum.  Like Walmart, yo. */
-	conn = xfer->data;
+	conn = purple_xfer_get_protocol_data(xfer);
 	conn->xferdata.recvcsum = peer_oft_checksum_chunk(buffer,
 			size, conn->xferdata.recvcsum, purple_xfer_get_bytes_sent(xfer) & 1);
 }
@@ -653,7 +653,7 @@ peer_oft_sendcb_init(PurpleXfer *xfer)
 	PeerConnection *conn;
 	size_t size;
 
-	conn = xfer->data;
+	conn = purple_xfer_get_protocol_data(xfer);
 	conn->flags |= PEER_CONNECTION_FLAG_APPROVED;
 
 	/* Make sure the file size can be represented in 32 bits */
@@ -713,7 +713,7 @@ peer_oft_sendcb_ack(PurpleXfer *xfer, co
 {
 	PeerConnection *conn;
 
-	conn = xfer->data;
+	conn = purple_xfer_get_protocol_data(xfer);
 
 	/*
 	 * If we're done sending, intercept the socket from the core ft code
@@ -742,7 +742,7 @@ peer_oft_cb_generic_cancel(PurpleXfer *x
 {
 	PeerConnection *conn;
 
-	conn = xfer->data;
+	conn = purple_xfer_get_protocol_data(xfer);
 
 	if (conn == NULL)
 		return;


More information about the Commits mailing list