aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2010-06-24 10:27:34 +0100
committerWilmer van der Gaast <wilmer@gaast.net>2010-06-24 10:27:34 +0100
commit051372c0219f067bb4b116bd06d482420b20e3c8 (patch)
tree9a90688832e70eb2bbe7ef8b3610a13eb5efba99
parent38ff846b14f1d1f80983a0818b9bcf60581a2a34 (diff)
Don't create multiple main loops if the user follows >100 people.
-rw-r--r--protocols/twitter/twitter_lib.c12
1 files changed, 8 insertions, 4 deletions
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);
}
/**