From 051372c0219f067bb4b116bd06d482420b20e3c8 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Thu, 24 Jun 2010 10:27:34 +0100 Subject: Don't create multiple main loops if the user follows >100 people. --- protocols/twitter/twitter_lib.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'protocols') diff --git a/protocols/twitter/twitter_lib.c b/protocols/twitter/twitter_lib.c index fb7a6af9..36422a5e 100644 --- a/protocols/twitter/twitter_lib.c +++ b/protocols/twitter/twitter_lib.c @@ -649,14 +649,18 @@ static void twitter_http_get_statuses_friends(struct http_request *req) // if the next_cursor is set to something bigger then 0 there are more friends to gather. if (txl->next_cursor > 0) + { twitter_get_statuses_friends(ic, txl->next_cursor); - + } + else + { + td->flags |= TWITTER_HAVE_FRIENDS; + twitter_login_finish(ic); + } + // Free the structure. txl_free(txl); g_free(txl); - - td->flags |= TWITTER_HAVE_FRIENDS; - twitter_login_finish(ic); } /** -- cgit v1.2.3