comparison 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
comparison
equal deleted inserted replaced
11083:8faabf4081ca 11084:2c21bffa8200
111 g_return_if_fail(xfer != NULL); 111 g_return_if_fail(xfer != NULL);
112 112
113 xfer->status = status; 113 xfer->status = status;
114 } 114 }
115 115
116 static void 116 void gaim_xfer_conversation_write(GaimXfer *xfer, char *message, gboolean is_error)
117 gaim_xfer_conversation_write(GaimXfer *xfer, char *message, gboolean is_error)
118 { 117 {
119 GaimConversation *conv = NULL; 118 GaimConversation *conv = NULL;
120 GaimMessageFlags flags = GAIM_MESSAGE_SYSTEM; 119 GaimMessageFlags flags = GAIM_MESSAGE_SYSTEM;
121 char *escaped; 120 char *escaped;
122 121
338 337
339 gaim_xfer_ref(xfer); 338 gaim_xfer_ref(xfer);
340 339
341 if (gaim_xfer_get_type(xfer) == GAIM_XFER_RECEIVE) { 340 if (gaim_xfer_get_type(xfer) == GAIM_XFER_RECEIVE) {
342 if (gaim_xfer_get_filename(xfer) || 341 if (gaim_xfer_get_filename(xfer) ||
343 gaim_xfer_get_status(xfer) == GAIM_XFER_STATUS_ACCEPTED) 342 gaim_xfer_get_status(xfer) == GAIM_XFER_STATUS_ACCEPTED) {
343 gchar* message = NULL;
344 message = g_strdup_printf(_("%s is offering to send file %s"),
345 xfer->who, gaim_xfer_get_filename(xfer));
346 gaim_xfer_conversation_write(xfer, message, FALSE);
347 g_free(message);
344 gaim_xfer_ask_recv(xfer); 348 gaim_xfer_ask_recv(xfer);
345 else 349 } else {
346 gaim_xfer_ask_accept(xfer); 350 gaim_xfer_ask_accept(xfer);
351 }
347 } else 352 } else
348 gaim_xfer_choose_file(xfer); 353 gaim_xfer_choose_file(xfer);
349 } 354 }
350 355
351 void 356 void