pidgin: b0ed68ca: Pass the gc as the handle in a bunch of ...
markdoliner at pidgin.im
markdoliner at pidgin.im
Thu Jun 18 19:40:22 EDT 2009
-----------------------------------------------------------------
Revision: b0ed68ca3d82a1ce76286aed5cfc1af79017d9af
Ancestor: e9834fb74620146356dcf39a70f200f0fab239db
Author: markdoliner at pidgin.im
Date: 2009-06-18T23:36:55
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/b0ed68ca3d82a1ce76286aed5cfc1af79017d9af
Modified files:
libpurple/protocols/bonjour/bonjour_ft.c
libpurple/protocols/bonjour/jabber.c
libpurple/protocols/sametime/sametime.c
libpurple/protocols/yahoo/yahoo_filexfer.c
libpurple/protocols/yahoo/yahoochat.c
libpurple/protocols/yahoo/ycht.c
ChangeLog:
Pass the gc as the handle in a bunch of calls to purple_proxy_connect
This causes the connection attempt to be canceled/destroyed if the
gc is destroyed
-------------- next part --------------
============================================================
--- libpurple/protocols/bonjour/bonjour_ft.c ddf772f60d247d99d8d8ed65e0067df1862e4e86
+++ libpurple/protocols/bonjour/bonjour_ft.c 9035669b40c8dedff94e8eda828d60aeafe85ed3
@@ -880,7 +880,9 @@ bonjour_bytestreams_connect(PurpleXfer *
purple_proxy_info_set_type(xf->proxy_info, PURPLE_PROXY_SOCKS5);
purple_proxy_info_set_host(xf->proxy_info, xf->proxy_host);
purple_proxy_info_set_port(xf->proxy_info, xf->proxy_port);
- xf->proxy_connection = purple_proxy_connect_socks5(NULL, xf->proxy_info,
+ xf->proxy_connection = purple_proxy_connect_socks5(
+ purple_account_get_connection(account),
+ xf->proxy_info,
dstaddr, 0,
bonjour_bytestreams_connect_cb, xfer);
============================================================
--- libpurple/protocols/bonjour/jabber.c 68a2b3bee4afe8be44a4e30d3b86ced321fd5a05
+++ libpurple/protocols/bonjour/jabber.c 3dcb2006d71bcedb20c1cf088c0466933dbcdb6f
@@ -926,7 +926,9 @@ _find_or_start_conversation(BonjourJabbe
}
purple_proxy_info_set_type(proxy_info, PURPLE_PROXY_NONE);
- connect_data = purple_proxy_connect(NULL, jdata->account,
+ connect_data = purple_proxy_connect(
+ purple_account_get_connection(jdata->account),
+ jdata->account,
ip, bb->port_p2pj, _connected_to_buddy, pb);
if (connect_data == NULL) {
============================================================
--- libpurple/protocols/sametime/sametime.c 5b8f7675a9d9740dd28f098fbfb49ac78a9c1c6a
+++ libpurple/protocols/sametime/sametime.c 5563fc6d7ae449bcd5e5654eae73bf4f209e7d1c
@@ -1466,7 +1466,7 @@ static void session_loginRedirect(struct
if(purple_account_get_bool(account, MW_KEY_FORCE, FALSE) ||
!host || (! strcmp(current_host, host)) ||
- (purple_proxy_connect(NULL, account, host, port, connect_cb, pd) == NULL)) {
+ (purple_proxy_connect(gc, account, host, port, connect_cb, pd) == NULL)) {
/* if we're configured to force logins, or if we're being
redirected to the already configured host, or if we couldn't
============================================================
--- libpurple/protocols/yahoo/yahoo_filexfer.c cf760dcc5854a7d39fe1981ddbd49dbd2728b4a9
+++ libpurple/protocols/yahoo/yahoo_filexfer.c c135943bddc801823412d0eca0eb334aebe5d3d8
@@ -320,7 +320,7 @@ static void yahoo_xfer_init(PurpleXfer *
if (purple_xfer_get_type(xfer) == PURPLE_XFER_SEND) {
if (yd->jp) {
- if (purple_proxy_connect(NULL, account, purple_account_get_string(account, "xferjp_host", YAHOOJP_XFER_HOST),
+ if (purple_proxy_connect(gc, account, purple_account_get_string(account, "xferjp_host", YAHOOJP_XFER_HOST),
purple_account_get_int(account, "xfer_port", YAHOO_XFER_PORT),
yahoo_sendfile_connected, xfer) == NULL)
{
@@ -329,7 +329,7 @@ static void yahoo_xfer_init(PurpleXfer *
purple_xfer_cancel_remote(xfer);
}
} else {
- if (purple_proxy_connect(NULL, account, purple_account_get_string(account, "xfer_host", YAHOO_XFER_HOST),
+ if (purple_proxy_connect(gc, account, purple_account_get_string(account, "xfer_host", YAHOO_XFER_HOST),
purple_account_get_int(account, "xfer_port", YAHOO_XFER_PORT),
yahoo_sendfile_connected, xfer) == NULL)
{
@@ -340,7 +340,7 @@ static void yahoo_xfer_init(PurpleXfer *
}
} else {
xfer->fd = -1;
- if (purple_proxy_connect(NULL, account, xfer_data->host, xfer_data->port,
+ if (purple_proxy_connect(gc, account, xfer_data->host, xfer_data->port,
yahoo_receivefile_connected, xfer) == NULL) {
purple_notify_error(gc, NULL, _("File Transfer Failed"),
_("Unable to establish file descriptor."));
@@ -1120,7 +1120,8 @@ static void yahoo_xfer_recv_cb_15(gpoint
}
g_free(buf);
- if (did < 0 && errno == EAGAIN) return;
+ if (did < 0 && errno == EAGAIN)
+ return;
else if (did < 0) {
purple_debug_error("yahoo", "Unable to write in order to start ft errno = %d\n", errno);
purple_xfer_cancel_remote(xfer);
@@ -1136,7 +1137,7 @@ static void yahoo_xfer_recv_cb_15(gpoint
close(source);/* Is this required? */
g_free(xd->txbuf);
xd->txbuf = NULL;
- if (purple_proxy_connect(NULL, account, xd->host, xd->port, yahoo_xfer_connected_15, xfer) == NULL)
+ if (purple_proxy_connect(gc, account, xd->host, xd->port, yahoo_xfer_connected_15, xfer) == NULL)
{
purple_notify_error(gc, NULL, _("File Transfer Failed"),
_("Unable to establish file descriptor."));
@@ -1841,7 +1842,7 @@ void yahoo_process_filetrans_info_15(Pur
yahoo_packet_send_and_free(pkt_to_send, yd);
- if (purple_proxy_connect(NULL, account, xfer_data->host, xfer_data->port,
+ if (purple_proxy_connect(gc, account, xfer_data->host, xfer_data->port,
yahoo_xfer_connected_15, xfer) == NULL) {
purple_notify_error(gc, NULL, _("File Transfer Failed"),
_("Unable to establish file descriptor."));
@@ -1921,7 +1922,7 @@ void yahoo_process_filetrans_acc_15(Purp
xfer_data->status_15 = ACCEPTED;
account = purple_connection_get_account(gc);
- if (purple_proxy_connect(NULL, account, xfer_data->host, xfer_data->port,
+ if (purple_proxy_connect(gc, account, xfer_data->host, xfer_data->port,
yahoo_xfer_connected_15, xfer) == NULL)
{
purple_notify_error(gc, NULL, _("File Transfer Failed"),_("Unable to connect"));
============================================================
--- libpurple/protocols/yahoo/yahoochat.c c143dc17510063c0c8f936255c486d449e68f130
+++ libpurple/protocols/yahoo/yahoochat.c 7101b40c76e3b988ea45b73f1f6c36e280201a3a
@@ -1519,7 +1519,7 @@ PurpleRoomlist *yahoo_roomlist_get_list(
purple_roomlist_set_fields(rl, fields);
- if (purple_proxy_connect(NULL, account, yrl->host, 80,
+ if (purple_proxy_connect(gc, account, yrl->host, 80,
yahoo_roomlist_got_connected, yrl) == NULL)
{
purple_notify_error(gc, NULL, _("Connection problem"), _("Unable to fetch room list."));
@@ -1588,8 +1588,9 @@ void yahoo_roomlist_expand_category(Purp
yrl->ucat = purple_roomlist_room_new(PURPLE_ROOMLIST_ROOMTYPE_CATEGORY, _("User Rooms"), yrl->cat);
purple_roomlist_room_add(list, yrl->ucat);
- if (purple_proxy_connect(NULL, list->account, yrl->host, 80,
- yahoo_roomlist_got_connected, yrl) == NULL)
+ if (purple_proxy_connect(purple_account_get_connection(list->account),
+ list->account, yrl->host, 80,
+ yahoo_roomlist_got_connected, yrl) == NULL)
{
purple_notify_error(purple_account_get_connection(list->account),
NULL, _("Connection problem"), _("Unable to fetch room list."));
============================================================
--- libpurple/protocols/yahoo/ycht.c 6ac5a6012b2301676b3f6963fb39de6b5195ef02
+++ libpurple/protocols/yahoo/ycht.c cc0c0c1fd9ba5f45f038e32c23e7ef2ee650ce0f
@@ -578,7 +578,7 @@ void ycht_connection_open(PurpleConnecti
yd->ycht = ycht;
- if (purple_proxy_connect(NULL, account,
+ if (purple_proxy_connect(gc, account,
purple_account_get_string(account, "ycht-server", YAHOO_YCHT_HOST),
purple_account_get_int(account, "ycht-port", YAHOO_YCHT_PORT),
ycht_got_connected, ycht) == NULL)
More information about the Commits
mailing list