[PATCH 2/4] Use NULL instead of "offline" for the user status.

Elliott Sales de Andrade qulogic at pidgin.im
Tue Jun 24 01:15:20 EDT 2008

On Mon, Jun 23, 2008 at 5:30 PM, Richard Laager <rlaager at wiktel.com> wrote:
> On Sun, 2008-06-22 at 18:03 +0300, Felipe Contreras wrote:
>> -     if (user->status != NULL) {
>> -             gboolean offline = (strcmp(user->status, "offline") == 0);
>> +     {
>> +             gboolean offline = (user->status == NULL);
>>               if (!offline) {
>>                       purple_prpl_got_user_status(account, user->passport, user->status,
> This leaves the code looking like this, right?
> {
>        code here
>        more code
> }
> Instead, the braces can be dropped and the code inside the block moved
> out. You'll also end up needing to move the definition of the offline
> variable because if you didn't, it'd be a declaration after code.

I've applied these patches on my branch, along with dropping those braces.

> /me tries referring to QuLogic as Elliott and hopes that is 1) correct
> and 2) acceptable. If you'd prefer QuLogic or something else, please let
> me know.

Either one is fine, yes.

> In response to Elliott's concern:
> Given that things are initialized as NULL (and this patch aims to fix a
> bug related to that, it seems), it seems reasonable to me to make NULL
> represent offline here.
> It seems that Elliott is looking at these patches. Elliott: If they
> seems good to you, feel free to merge them to trunk.

I was hoping that Masca would try these out first as I have not
personally seen the same crash happen, but I haven't heard from him
yet. Other than that, I don't really see any problems with merging

> On a related note,
> where are you at on your MSN branch? Does that fix some issues? Is it
> stable enough to merge to trunk?

I think it looks pretty good at the moment. I think token tickets are
updated correctly now. Dimmuxx said he's been running it for 48h+ and
is still able to send OIM's with the tokens updated automatically when
needed. There was a bug logging in with the HTTP method, but I've now
fixed it, so I haven't seen any show-stoppers lately.

More information about the Devel mailing list