changeset 6242:f0b0c5bca588

[gaim-migrate @ 6736] File transfers should now have the local IP set to either the account's public IP or the globally set local IP, if either exist. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Sun, 20 Jul 2003 05:11:14 +0000
parents 9ce44a7f9ae7
children 34d553c43e8b
files src/ft.c
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/ft.c	Sun Jul 20 03:44:39 2003 +0000
+++ b/src/ft.c	Sun Jul 20 05:11:14 2003 +0000
@@ -31,6 +31,7 @@
 GaimXfer *
 gaim_xfer_new(GaimAccount *account, GaimXferType type, const char *who)
 {
+	const char *ip;
 	GaimXfer *xfer;
 	GaimXferUiOps *ui_ops;
 
@@ -45,6 +46,12 @@
 	xfer->who     = g_strdup(who);
 	xfer->ui_ops  = gaim_get_xfer_ui_ops();
 
+	if ((ip = gaim_account_get_public_ip(account)) != NULL)
+		ip = gaim_prefs_get_string("/core/ft/public_ip");
+
+	if (ip != NULL && *ip != '\0')
+		xfer->local_ip = g_strdup(ip);
+
 	ui_ops = gaim_xfer_get_ui_ops(xfer);
 
 	if (ui_ops != NULL && ui_ops->new_xfer != NULL)