# HG changeset patch # User Mark Doliner # Date 1245367898 0 # Node ID a9899d234dfa51161618fdbc18e8989b493a4b96 # Parent e6eee2b3417cbc919e9b6826027b2a5bcacdf800 Pass the handle in here, which causes the connection attempt to be canceled and freed if the gc is destroyed, eliminating the need for PURPLE_CONNECTION_IS_VALID diff -r e6eee2b3417c -r a9899d234dfa libpurple/protocols/oscar/oscar.c --- a/libpurple/protocols/oscar/oscar.c Thu Jun 18 22:40:12 2009 +0000 +++ b/libpurple/protocols/oscar/oscar.c Thu Jun 18 23:31:38 2009 +0000 @@ -1833,13 +1833,6 @@ gchar *buf; gssize result; - if (!PURPLE_CONNECTION_IS_VALID(pos->gc)) - { - g_free(pos->modname); - g_free(pos); - return; - } - pos->fd = source; if (source < 0) { @@ -1937,8 +1930,7 @@ pos->len = len; pos->modname = g_strdup(modname); - /* TODO: Keep track of this return value. */ - if (purple_proxy_connect(NULL, pos->gc->account, "pidgin.im", 80, + if (purple_proxy_connect(pos->gc, pos->gc->account, "pidgin.im", 80, straight_to_hell, pos) == NULL) { char buf[256];