pidgin: 916db4cd: Oscar: Use file-transfer accessor functi...

andrew.victor at mxit.com andrew.victor at mxit.com
Sun Oct 30 12:20:48 EDT 2011


----------------------------------------------------------------------
Revision: 916db4cda059ad2027ede19d2124b8a1446cbbf8
Parent:   aa14b9a7d2d94920dba2766254792cde9b3f0dc6
Author:   andrew.victor at mxit.com
Date:     10/30/11 11:55:56
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/916db4cda059ad2027ede19d2124b8a1446cbbf8

Changelog: 

Oscar: Use file-transfer accessor functions


Changes against parent aa14b9a7d2d94920dba2766254792cde9b3f0dc6

  patched  libpurple/protocols/oscar/oft.c

-------------- next part --------------
============================================================
--- libpurple/protocols/oscar/oft.c	4908356647c8145427614443a63b4451422feb36
+++ libpurple/protocols/oscar/oft.c	1d32bb0a29e25d31fcd543015523056b027c23ef
@@ -508,7 +508,7 @@ peer_oft_recv_frame_done(PeerConnection 
 
 	purple_input_remove(conn->watcher_incoming);
 	conn->watcher_incoming = 0;
-	conn->xfer->fd = conn->fd;
+	purple_xfer_set_fd(conn->xfer, conn->fd);
 	conn->fd = -1;
 	conn->disconnect_reason = OSCAR_DISCONNECT_DONE;
 	peer_connection_schedule_destroy(conn, conn->disconnect_reason, NULL);
@@ -602,8 +602,8 @@ peer_oft_recvcb_end(PurpleXfer *xfer)
 	conn = purple_xfer_get_protocol_data(xfer);
 
 	/* Tell the other person that we've received everything */
-	conn->fd = conn->xfer->fd;
-	conn->xfer->fd = -1;
+	conn->fd = purple_xfer_get_fd(conn->xfer);
+	purple_xfer_set_fd(conn->xfer, -1);
 	peer_oft_send_done(conn);
 
 	conn->disconnect_reason = OSCAR_DISCONNECT_DONE;
@@ -721,9 +721,9 @@ peer_oft_sendcb_ack(PurpleXfer *xfer, co
 	 */
 	if (purple_xfer_get_bytes_remaining(xfer) <= 0)
 	{
-		purple_input_remove(xfer->watcher);
-		conn->fd = xfer->fd;
-		xfer->fd = -1;
+		purple_input_remove(purple_xfer_get_watcher(xfer));
+		conn->fd = purple_xfer_get_fd(xfer);
+		purple_xfer_set_fd(xfer, -1);
 		conn->watcher_incoming = purple_input_add(conn->fd,
 				PURPLE_INPUT_READ, peer_connection_recv_cb, conn);
 	}


More information about the Commits mailing list