Mercurial > pidgin.yaz
comparison 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 |
comparison
equal
deleted
inserted
replaced
27200:a9899d234dfa | 27201:d078048fb03a |
---|---|
1517 f = purple_roomlist_field_new(PURPLE_ROOMLIST_FIELD_STRING, _("Topic"), "topic", FALSE); | 1517 f = purple_roomlist_field_new(PURPLE_ROOMLIST_FIELD_STRING, _("Topic"), "topic", FALSE); |
1518 fields = g_list_append(fields, f); | 1518 fields = g_list_append(fields, f); |
1519 | 1519 |
1520 purple_roomlist_set_fields(rl, fields); | 1520 purple_roomlist_set_fields(rl, fields); |
1521 | 1521 |
1522 if (purple_proxy_connect(NULL, account, yrl->host, 80, | 1522 if (purple_proxy_connect(gc, account, yrl->host, 80, |
1523 yahoo_roomlist_got_connected, yrl) == NULL) | 1523 yahoo_roomlist_got_connected, yrl) == NULL) |
1524 { | 1524 { |
1525 purple_notify_error(gc, NULL, _("Connection problem"), _("Unable to fetch room list.")); | 1525 purple_notify_error(gc, NULL, _("Connection problem"), _("Unable to fetch room list.")); |
1526 yahoo_roomlist_cleanup(rl, yrl); | 1526 yahoo_roomlist_cleanup(rl, yrl); |
1527 return NULL; | 1527 return NULL; |
1586 g_free(url); | 1586 g_free(url); |
1587 | 1587 |
1588 yrl->ucat = purple_roomlist_room_new(PURPLE_ROOMLIST_ROOMTYPE_CATEGORY, _("User Rooms"), yrl->cat); | 1588 yrl->ucat = purple_roomlist_room_new(PURPLE_ROOMLIST_ROOMTYPE_CATEGORY, _("User Rooms"), yrl->cat); |
1589 purple_roomlist_room_add(list, yrl->ucat); | 1589 purple_roomlist_room_add(list, yrl->ucat); |
1590 | 1590 |
1591 if (purple_proxy_connect(NULL, list->account, yrl->host, 80, | 1591 if (purple_proxy_connect(purple_account_get_connection(list->account), |
1592 yahoo_roomlist_got_connected, yrl) == NULL) | 1592 list->account, yrl->host, 80, |
1593 yahoo_roomlist_got_connected, yrl) == NULL) | |
1593 { | 1594 { |
1594 purple_notify_error(purple_account_get_connection(list->account), | 1595 purple_notify_error(purple_account_get_connection(list->account), |
1595 NULL, _("Connection problem"), _("Unable to fetch room list.")); | 1596 NULL, _("Connection problem"), _("Unable to fetch room list.")); |
1596 purple_roomlist_ref(list); | 1597 purple_roomlist_ref(list); |
1597 yahoo_roomlist_cleanup(list, yrl); | 1598 yahoo_roomlist_cleanup(list, yrl); |