Mercurial > pidgin.yaz
comparison libpurple/protocols/oscar/oscar.c @ 27200:a9899d234dfa
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
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Thu, 18 Jun 2009 23:31:38 +0000 |
parents | 28b5fcfb7444 |
children | 01f1929d0936 462a509fb2ad |
comparison
equal
deleted
inserted
replaced
27199:e6eee2b3417c | 27200:a9899d234dfa |
---|---|
1831 { | 1831 { |
1832 struct pieceofcrap *pos = data; | 1832 struct pieceofcrap *pos = data; |
1833 gchar *buf; | 1833 gchar *buf; |
1834 gssize result; | 1834 gssize result; |
1835 | 1835 |
1836 if (!PURPLE_CONNECTION_IS_VALID(pos->gc)) | |
1837 { | |
1838 g_free(pos->modname); | |
1839 g_free(pos); | |
1840 return; | |
1841 } | |
1842 | |
1843 pos->fd = source; | 1836 pos->fd = source; |
1844 | 1837 |
1845 if (source < 0) { | 1838 if (source < 0) { |
1846 GHashTable *ui_info = purple_core_get_ui_info(); | 1839 GHashTable *ui_info = purple_core_get_ui_info(); |
1847 buf = g_strdup_printf(_("You may be disconnected shortly. " | 1840 buf = g_strdup_printf(_("You may be disconnected shortly. " |
1935 | 1928 |
1936 pos->offset = offset; | 1929 pos->offset = offset; |
1937 pos->len = len; | 1930 pos->len = len; |
1938 pos->modname = g_strdup(modname); | 1931 pos->modname = g_strdup(modname); |
1939 | 1932 |
1940 /* TODO: Keep track of this return value. */ | 1933 if (purple_proxy_connect(pos->gc, pos->gc->account, "pidgin.im", 80, |
1941 if (purple_proxy_connect(NULL, pos->gc->account, "pidgin.im", 80, | |
1942 straight_to_hell, pos) == NULL) | 1934 straight_to_hell, pos) == NULL) |
1943 { | 1935 { |
1944 char buf[256]; | 1936 char buf[256]; |
1945 GHashTable *ui_info = purple_core_get_ui_info(); | 1937 GHashTable *ui_info = purple_core_get_ui_info(); |
1946 g_free(pos->modname); | 1938 g_free(pos->modname); |