Re: Bug report: Yahoo

Meredydd <[email protected]> Wed, 18 Feb 2004 23:43:34 +0000
Newsgroups gmane.network.everybuddy.user
Message-ID <[email protected]>
Good, commit!

On Wednesday 18 February 2004 23:34, A. Craig West wrote:
> On Wed, 18 Feb 2004, Meredydd wrote:
> > Probably one for you, Craig...
> >
> > I have myself on my own buddy list in Yahoo. I sign in, all fine. I
> > can see other people's status. When I change my status to BRB, I
> > see it on my contact list. I change to any other "Away"-type status
> > (including Invisible), I see it there too. However, at no point
> > does my local account status indicator show anything other than
> > "Online", and if I explicity select "Online", it won't bring me
> > back. Setting myself as Offline and then Online works fine.
>
> Easy fix, anyways. I also converted some C++ style comments back to C
> style just for consistency.
>
> ----------- Patch Begins ----------------
> Index: core/plugins/yahoo/yahoo.c
> ===================================================================
> --- core/plugins/yahoo/yahoo.c	(revision 273)
> +++ core/plugins/yahoo/yahoo.c	(working copy)
> @@ -124,7 +124,7 @@
>    eb_ylad * lad = GET_LAD(la);
>    if (!la->connected)
>    {
> -    return; // already done
> +    return; /* already done */
>    }
>
>    free(la->status_string);
> @@ -145,16 +145,17 @@
>    int st_id;
>    char * st_str = NULL;
>
> -  if (!strcmp(state, "Offline")) {
> +  if (!strcmp(state, "Offline"))
> +  {
>      logout(la);
>      return;
>    }
>    else
>    {
> -	// Check if we are connected yet
> +	/* Check if we are connected yet */
>    	if (!la->connected)
>  	{
> -	  // connect to the server
> +	  /* connect to the server */
>  	  login(la);
>  	}
>
> @@ -215,10 +216,11 @@
>
>  	if (la->ready)
>  	{
> -	  // Only set the away message if the connection is ready
> +	  /* Only set the away message if the connection is ready */
>  	  yahoo_set_away(lad->id, st_id, st_str, away_msg != NULL);
>  	  free(la->status_string);
>  	  la->status_string = strdup(state);
> +	  eb_local_account_update(la);
>  	}
>    }
>  }
> @@ -502,7 +504,7 @@
>    {
>      eb_account * acc = (eb_account *)en->data;
>
> -    if (acc->protocol_data == NULL) // wasn't on the list
> +    if (acc->protocol_data == NULL) /* wasn't on the list */
>      {
>  	  p = 1;
>  	  free(acc->status_string);
> ------------ Patch Ends -----------------