comparison 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
comparison
equal deleted inserted replaced
8230:4e354776ae2a 8231:f50c059b6384
33 #include "core.h" 33 #include "core.h"
34 #include "debug.h" 34 #include "debug.h"
35 #include "ft.h" 35 #include "ft.h"
36 #include "imgstore.h" 36 #include "imgstore.h"
37 #include "multi.h" 37 #include "multi.h"
38 #include "network.h"
38 #include "notify.h" 39 #include "notify.h"
39 #include "privacy.h" 40 #include "privacy.h"
40 #include "prpl.h" 41 #include "prpl.h"
41 #include "proxy.h" 42 #include "proxy.h"
42 #include "request.h" 43 #include "request.h"
1030 return NULL; 1031 return NULL;
1031 } 1032 }
1032 1033
1033 static void oscar_ask_sendfile(GaimConnection *gc, const char *destsn) { 1034 static void oscar_ask_sendfile(GaimConnection *gc, const char *destsn) {
1034 OscarData *od = (OscarData *)gc->proto_data; 1035 OscarData *od = (OscarData *)gc->proto_data;
1036 GaimAccount *account = gaim_connection_get_account(gc);
1035 GaimXfer *xfer; 1037 GaimXfer *xfer;
1036 struct aim_oft_info *oft_info; 1038 struct aim_oft_info *oft_info;
1039 const char *ip;
1037 1040
1038 /* You want to send a file to someone else, you're so generous */ 1041 /* You want to send a file to someone else, you're so generous */
1039 1042
1040 /* Build the file transfer handle */ 1043 /* Build the file transfer handle */
1041 xfer = gaim_xfer_new(gaim_connection_get_account(gc), GAIM_XFER_SEND, destsn); 1044 xfer = gaim_xfer_new(gaim_connection_get_account(gc), GAIM_XFER_SEND, destsn);
1042 xfer->local_port = 5190; 1045 xfer->local_port = 5190;
1043 1046
1044 /* Create the oscar-specific data */ 1047 /* Create the oscar-specific data */
1045 oft_info = aim_oft_createinfo(od->sess, NULL, destsn, xfer->local_ip, xfer->local_port, 0, 0, NULL); 1048 ip = gaim_network_get_ip_for_account(account, od->conn?od->conn->fd:-1);
1049 oft_info = aim_oft_createinfo(od->sess, NULL, destsn, ip, xfer->local_port, 0, 0, NULL);
1046 xfer->data = oft_info; 1050 xfer->data = oft_info;
1047 1051
1048 /* Setup our I/O op functions */ 1052 /* Setup our I/O op functions */
1049 gaim_xfer_set_init_fnc(xfer, oscar_xfer_init); 1053 gaim_xfer_set_init_fnc(xfer, oscar_xfer_init);
1050 gaim_xfer_set_start_fnc(xfer, oscar_xfer_start); 1054 gaim_xfer_set_start_fnc(xfer, oscar_xfer_start);