Mercurial > pidgin
diff src/proxy.c @ 13968:6fc412e59214
[gaim-migrate @ 16525]
A bunch of little things
* Use GAIM_CONNECTION_IS_VALID(gc) in a lot of places where
we were doing g_list_find(gaim_connections_get_all(), gc)
* Get rid of a lot of places where we were doing
g_list_find(gaim_connections_get_all(), gc). The handle used
by the request API ensures that the ok and cancel callback
functions won't be called if the gc is destroyed. However,
GAIM_CONNECTION_IS_VALID(gc) is still very important for
callback functions where we can't cancel the request.
For example, gaim_proxy_connect() callback functions.
* "Added" a function to Yahoo! that should help us notice
when our buddies change their buddy icon/display picture
* Some comments in a few places
* Changed GAIM_CONNECTION_IS_VALID(gc) to only look through
the list of "all" connections and not the list of
"connecting" connections. Some time ago we changed how
this was done so that the list of "all" connections now
includes the "connection" connections.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Thu, 20 Jul 2006 08:11:54 +0000 |
parents | 59af3aecf580 |
children | 8bda65b88e49 |
line wrap: on
line diff
--- a/src/proxy.c Thu Jul 20 07:31:15 2006 +0000 +++ b/src/proxy.c Thu Jul 20 08:11:54 2006 +0000 @@ -86,9 +86,9 @@ { g_return_if_fail(info != NULL); - if (info->host != NULL) g_free(info->host); - if (info->username != NULL) g_free(info->username); - if (info->password != NULL) g_free(info->password); + g_free(info->host); + g_free(info->username); + g_free(info->password); g_free(info); } @@ -106,8 +106,7 @@ { g_return_if_fail(info != NULL); - if (info->host != NULL) - g_free(info->host); + g_free(info->host); info->host = (host == NULL ? NULL : g_strdup(host)); } @@ -125,8 +124,7 @@ { g_return_if_fail(info != NULL); - if (info->username != NULL) - g_free(info->username); + g_free(info->username); info->username = (username == NULL ? NULL : g_strdup(username)); } @@ -136,8 +134,7 @@ { g_return_if_fail(info != NULL); - if (info->password != NULL) - g_free(info->password); + g_free(info->password); info->password = (password == NULL ? NULL : g_strdup(password)); } @@ -303,7 +300,7 @@ trap_gdb_bug() { const char *message = - "Gaim's DNS child got a SIGTRAP signal. \n" + "Gaim's DNS child got a SIGTRAP signal.\n" "This can be caused by trying to run gaim inside gdb.\n" "There is a known gdb bug which prevents this. Supposedly gaim\n" "should have detected you were using gdb and used an ugly hack,\n" @@ -2319,6 +2316,12 @@ return gpi; } +/* + * TODO: It would be really good if this returned some sort of handle + * that we could use to cancel the connection. As it is now, + * each callback has to check to make sure gc is still valid. + * And that is ugly. + */ int gaim_proxy_connect(GaimAccount *account, const char *host, int port, GaimInputFunction func, gpointer data)