diff src/ft.c @ 11084:2c21bffa8200

[gaim-migrate @ 13103] OSCAR file transfers now work for users behind the same NAT. This should be useful to users of corporate and campus networks. Users of AIM and ICQ 5.02 and newer will see the benefits of this change. Gaim will now try the IP address that the AOL servers see for the sender for 15 seconds (the verified IP), then try the IP address that the sender sees for itself (client IP). The file transfer times out if that fails after an additional 15 seconds. Also, a few more status messages regarding the file transfer are now sent to the conversation window. committer: Tailor Script <tailor@pidgin.im>
author Jonathan Clark <ardentlygnarly>
date Mon, 11 Jul 2005 02:19:13 +0000
parents 9695281b1aa1
children bd8ac1d4b2f2
line wrap: on
line diff
--- a/src/ft.c	Mon Jul 11 00:36:28 2005 +0000
+++ b/src/ft.c	Mon Jul 11 02:19:13 2005 +0000
@@ -113,8 +113,7 @@
 	xfer->status = status;
 }
 
-static void
-gaim_xfer_conversation_write(GaimXfer *xfer, char *message, gboolean is_error)
+void gaim_xfer_conversation_write(GaimXfer *xfer, char *message, gboolean is_error)
 {
 	GaimConversation *conv = NULL;
 	GaimMessageFlags flags = GAIM_MESSAGE_SYSTEM;
@@ -340,10 +339,16 @@
 
 	if (gaim_xfer_get_type(xfer) == GAIM_XFER_RECEIVE) {
 		if (gaim_xfer_get_filename(xfer) ||
-		    gaim_xfer_get_status(xfer) == GAIM_XFER_STATUS_ACCEPTED)
+		    gaim_xfer_get_status(xfer) == GAIM_XFER_STATUS_ACCEPTED) {
+			gchar* message = NULL;
+			message = g_strdup_printf(_("%s is offering to send file %s"),
+				xfer->who, gaim_xfer_get_filename(xfer));
+			gaim_xfer_conversation_write(xfer, message, FALSE);
+			g_free(message);
 			gaim_xfer_ask_recv(xfer);
-		else
+		} else {
 			gaim_xfer_ask_accept(xfer);
+		}
 	} else
 		gaim_xfer_choose_file(xfer);
 }