diff libpurple/protocols/yahoo/yahoochat.c @ 27201:d078048fb03a

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
author Mark Doliner <mark@kingant.net>
date Thu, 18 Jun 2009 23:36:55 +0000
parents 510f07e1f5c1
children 377e063ecda5 462a509fb2ad
line wrap: on
line diff
--- a/libpurple/protocols/yahoo/yahoochat.c	Thu Jun 18 23:31:38 2009 +0000
+++ b/libpurple/protocols/yahoo/yahoochat.c	Thu Jun 18 23:36:55 2009 +0000
@@ -1519,7 +1519,7 @@
 
 	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 @@
 	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."));