pidgin/gtkutils.c

changeset 38827
3573c82d32d8
parent 38433
361c801c4536
child 38833
47a8f1e4c414
--- a/pidgin/gtkutils.c	Wed Aug 30 20:33:01 2017 -0300
+++ b/pidgin/gtkutils.c	Thu Aug 31 22:40:50 2017 -0500
@@ -1439,10 +1439,15 @@
 	if (!(purple_connection_get_flags(gc) & PURPLE_CONNECTION_FLAG_NO_IMAGES))
 		im = TRUE;
 
-	if (protocol && PURPLE_PROTOCOL_IMPLEMENTS(protocol, XFER_IFACE, can_receive))
-		ft = purple_protocol_xfer_iface_can_receive(protocol, gc, who);
-	else if (protocol && PURPLE_PROTOCOL_IMPLEMENTS(protocol, XFER_IFACE, send))
-		ft = TRUE;
+	if (protocol && PURPLE_IS_PROTOCOL_XFER(protocol)) {
+		PurpleProtocolXferInterface *iface = PURPLE_PROTOCOL_XFER(protocol);
+
+		if(iface->can_receive) {
+			ft = purple_protocol_xfer_can_receive(protocol, gc, who);
+		} else {
+			ft = (iface->send) ? TRUE : FALSE;
+		}
+	}
 
 	if (im && ft) {
 		purple_request_choice(NULL, NULL,

mercurial