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_lib.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'protocols/twitter/twitter_lib.c') diff --git a/protocols/twitter/twitter_lib.c b/protocols/twitter/twitter_lib.c index 05222af2..a98054dd 100644 --- a/protocols/twitter/twitter_lib.c +++ b/protocols/twitter/twitter_lib.c @@ -899,7 +899,7 @@ static void twitter_get_mentions(struct im_connection *ic, gint64 next_cursor); /** * Get the timeline with optionally mentions */ -void twitter_get_timeline(struct im_connection *ic, gint64 next_cursor) +gboolean twitter_get_timeline(struct im_connection *ic, gint64 next_cursor) { struct twitter_data *td = ic->proto_data; gboolean include_mentions = set_getbool(&ic->acc->set, "fetch_mentions"); @@ -908,6 +908,7 @@ void twitter_get_timeline(struct im_connection *ic, gint64 next_cursor) if (++td->http_fails >= 5) { imcb_error(ic, "Fetch timeout (%d)", td->flags); imc_logout(ic, TRUE); + return FALSE; } } @@ -918,6 +919,8 @@ void twitter_get_timeline(struct im_connection *ic, gint64 next_cursor) if (include_mentions) { twitter_get_mentions(ic, next_cursor); } + + return TRUE; } /** -- cgit v1.2.3