Changeset 2f9027c


Ignore:
Timestamp:
2013-06-16T17:33:58Z (11 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
7e84168
Parents:
1a2c1c0
Message:

Fix cleanup failure on Twitter timeouts.

Location:
protocols/twitter
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • protocols/twitter/twitter.c

    r1a2c1c0 r2f9027c  
    4040        // Check if we are still logged in...
    4141        if (!g_slist_find(twitter_connections, ic))
    42                 return 0;
     42                return FALSE;
    4343
    4444        // Do stuff..
    45         twitter_get_timeline(ic, -1);
    46 
    47         // If we are still logged in run this function again after timeout.
    48         return (ic->flags & OPT_LOGGED_IN) == OPT_LOGGED_IN;
     45        return twitter_get_timeline(ic, -1) &&
     46               ((ic->flags & OPT_LOGGED_IN) == OPT_LOGGED_IN);
    4947}
    5048
  • protocols/twitter/twitter_lib.c

    r1a2c1c0 r2f9027c  
    900900 * Get the timeline with optionally mentions
    901901 */
    902 void twitter_get_timeline(struct im_connection *ic, gint64 next_cursor)
     902gboolean twitter_get_timeline(struct im_connection *ic, gint64 next_cursor)
    903903{
    904904        struct twitter_data *td = ic->proto_data;
     
    909909                        imcb_error(ic, "Fetch timeout (%d)", td->flags);
    910910                        imc_logout(ic, TRUE);
     911                        return FALSE;
    911912                }
    912913        }
     
    919920                twitter_get_mentions(ic, next_cursor);
    920921        }
     922       
     923        return TRUE;
    921924}
    922925
  • protocols/twitter/twitter_lib.h

    r1a2c1c0 r2f9027c  
    8282
    8383gboolean twitter_open_stream(struct im_connection *ic);
    84 void twitter_get_timeline(struct im_connection *ic, gint64 next_cursor);
     84gboolean twitter_get_timeline(struct im_connection *ic, gint64 next_cursor);
    8585void twitter_get_friends_ids(struct im_connection *ic, gint64 next_cursor);
    8686void twitter_get_statuses_friends(struct im_connection *ic, gint64 next_cursor);
Note: See TracChangeset for help on using the changeset viewer.