diff src/protocols/oscar/oscar.c @ 8231:f50c059b6384

[gaim-migrate @ 8954] This is Tim Ringenbach's patch to move some IP-related functions into the new gaim_network namespace, improve the local IP checking functionality by opening a socket, change some prefs, and add the ability to modify these prefs in the UI. Some ft.c bugs were fixed, and OSCAR, Jabber and Yahoo were updated to reflect the changes. The DCC SEND portion of this patch was not committed, as per his request (unless I misunderstood? :) committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Thu, 12 Feb 2004 00:36:55 +0000
parents b01822d23da3
children 4f70e8b3e05e
line wrap: on
line diff
--- a/src/protocols/oscar/oscar.c	Wed Feb 11 22:34:55 2004 +0000
+++ b/src/protocols/oscar/oscar.c	Thu Feb 12 00:36:55 2004 +0000
@@ -35,6 +35,7 @@
 #include "ft.h"
 #include "imgstore.h"
 #include "multi.h"
+#include "network.h"
 #include "notify.h"
 #include "privacy.h"
 #include "prpl.h"
@@ -1032,8 +1033,10 @@
 
 static void oscar_ask_sendfile(GaimConnection *gc, const char *destsn) {
 	OscarData *od = (OscarData *)gc->proto_data;
+	GaimAccount *account = gaim_connection_get_account(gc);
 	GaimXfer *xfer;
 	struct aim_oft_info *oft_info;
+	const char *ip;
 
 	/* You want to send a file to someone else, you're so generous */
 
@@ -1042,7 +1045,8 @@
 	xfer->local_port = 5190;
 
 	/* Create the oscar-specific data */
-	oft_info = aim_oft_createinfo(od->sess, NULL, destsn, xfer->local_ip, xfer->local_port, 0, 0, NULL);
+	ip = gaim_network_get_ip_for_account(account, od->conn?od->conn->fd:-1);
+	oft_info = aim_oft_createinfo(od->sess, NULL, destsn, ip, xfer->local_port, 0, 0, NULL);
 	xfer->data = oft_info;
 
 	 /* Setup our I/O op functions */