[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pidgin-devel
Subject:    Re: gobjectification: 2ab99dba: When initializing a PurpleConnection
From:       "Elliott Sales de Andrade" <qulogic () pidgin ! im>
Date:       2008-08-13 4:50:15
Message-ID: 1aa3d3e00808122150s66f8c358n41255293a0c9fee2 () mail ! gmail ! com
[Download RAW message or body]

On Tue, Aug 12, 2008 at 1:47 AM, Sadrul Habib Chowdhury
<imadil@gmail.com> wrote:
> * qulogic@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).
>

Ah, I see. Well, most of the XMPP callbacks seemed to be properly
removed anyway, so I dropped the PURPLE_CONNECTION_IS_VALID checks.
There were a couple other places which opened dialog windows. I worked
around those by taking another reference to the connection and
checking if it was connected in the callback. I'm not sure whether
they all work yet, though.

> On a side note, a *huge* thanks for working on i.p.g! :)
>

Somebody's gotta do it, or it'll be like MSNp14 ;)

> Sadrul
>

_______________________________________________
Devel mailing list
Devel@pidgin.im
http://pidgin.im/cgi-bin/mailman/listinfo/devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic