From 2f9027c9d6fbc50226e94305afe1cb0fba9deeca Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Sun, 16 Jun 2013 18:33:58 +0100 Subject: Fix cleanup failure on Twitter timeouts. --- protocols/twitter/twitter.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'protocols/twitter/twitter.c') diff --git a/protocols/twitter/twitter.c b/protocols/twitter/twitter.c index 4626cf55..57820568 100644 --- a/protocols/twitter/twitter.c +++ b/protocols/twitter/twitter.c @@ -39,13 +39,11 @@ gboolean twitter_main_loop(gpointer data, gint fd, b_input_condition cond) // Check if we are still logged in... if (!g_slist_find(twitter_connections, ic)) - return 0; + return FALSE; // Do stuff.. - twitter_get_timeline(ic, -1); - - // If we are still logged in run this function again after timeout. - return (ic->flags & OPT_LOGGED_IN) == OPT_LOGGED_IN; + return twitter_get_timeline(ic, -1) && + ((ic->flags & OPT_LOGGED_IN) == OPT_LOGGED_IN); } static void twitter_main_loop_start(struct im_connection *ic) -- cgit v1.2.3