Changeset 2dcde94


Ignore:
Timestamp:
2012-12-03T23:30:33Z (11 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
573e274
Parents:
3ca001b
Message:

Don't hide own tweets in streaming mode with fetch_mentions off, and move
txs_free() to the right place - fixes a memory leak.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/twitter/twitter_lib.c

    r3ca001b r2dcde94  
    814814       
    815815        if ((txs = twitter_xt_get_status(o))) {
    816                 return twitter_stream_handle_status(ic, txs);
     816                gboolean ret = twitter_stream_handle_status(ic, txs);
     817                txs_free(txs);
     818                return ret;
    817819        } else if ((c = json_o_get(o, "direct_message")) &&
    818820                   (txs = twitter_xt_get_dm(c))) {
     
    847849                if (td->log[i].id == txs->id) {
    848850                        /* Got a duplicate (RT, probably). Drop it. */
    849                         txs_free(txs);
    850851                        return TRUE;
    851852                }
    852853        }
    853854       
    854         if (!(set_getbool(&ic->acc->set, "fetch_mentions") ||
     855        if (!(strcmp(txs->user->screen_name, td->user) == 0 ||
     856              set_getbool(&ic->acc->set, "fetch_mentions") ||
    855857              bee_user_by_handle(ic->bee, ic, txs->user->screen_name))) {
    856858                /* Tweet is from an unknown person and the user does not want
     
    864866       
    865867        twitter_status_show(ic, txs);
    866         txs_free(txs);
    867868       
    868869        return TRUE;
Note: See TracChangeset for help on using the changeset viewer.