gobjectification: 2ab99dba: When initializing a PurpleConnection obj...
Sadrul Habib Chowdhury
imadil at gmail.com
Tue Aug 12 01:47:37 EDT 2008
* qulogic at pidgin.im had this to say on [12 Aug 2008, 00:56:46 -0400]:
> -----------------------------------------------------------------
> Revision: 2ab99dba1f8047c40af1b87d397a5a90c78fe03f
[snip]
> ChangeLog:
>
> When initializing a PurpleConnection object, save it in the connections
> list so that PURPLE_CONNECTION_IS_VALID works properly. This fixes that
> XMPP-login-freezes-stuff bug.
>
> ============================================================
> --- libpurple/connection.c 9db8a438a8038fc3d8f3033a7d0f454bafbda717
> +++ libpurple/connection.c 0b8deb5cc06e2d1cbe281ff49936aeb880db8c54
> @@ -810,6 +810,8 @@ purple_connection_init(GTypeInstance *in
> PurpleConnection *pc = PURPLE_CONNECTION(instance);
>
> pc->priv = g_new0(PurpleConnectionPrivate, 1);
> + connections = g_list_append(connections, pc);
> +
> purple_connection_set_state(pc, PURPLE_CONNECTION_STATE_CONNECTING);
> }
>
If I recall correctly, this was left out specifically to make sure we
can get rid of PURPLE_CONNECTION_IS_VALID. The check is usually used
from some callbacks, and the idea is that all the callbacks associated
with the PurpleObject should be disconnected/removed when the object is
destroyed (thus making the _IS_VALID check unnecessary).
On a side note, a *huge* thanks for working on i.p.g! :)
Sadrul
More information about the Devel
mailing list