From bd64716b5687e6652ada7112a43ff3455e32231e Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Wed, 30 Jun 2010 00:30:05 +0100 Subject: next_cursor is a 64-bit integer. Make it so. This should fix issues with getting contact lists containing >100 people. I'm still not getting a full list but even Twitter claims I'm at the end of the list. Will investigate later. --- protocols/twitter/twitter_lib.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'protocols/twitter/twitter_lib.c') diff --git a/protocols/twitter/twitter_lib.c b/protocols/twitter/twitter_lib.c index 36422a5e..f8efb711 100644 --- a/protocols/twitter/twitter_lib.c +++ b/protocols/twitter/twitter_lib.c @@ -41,7 +41,7 @@ struct twitter_xml_list { int type; - int next_cursor; + int64_t next_cursor; GSList *list; gpointer data; }; @@ -170,8 +170,12 @@ void twitter_get_friends_ids(struct im_connection *ic, int next_cursor) */ static xt_status twitter_xt_next_cursor( struct xt_node *node, struct twitter_xml_list *txl ) { - // Do something with the cursor. - txl->next_cursor = node->text != NULL ? atoi(node->text) : -1; + char *end = NULL; + + if( node->text ) + txl->next_cursor = g_ascii_strtoll( node->text, &end, 10 ); + if( end == NULL ) + txl->next_cursor = -1; return XT_HANDLED; } -- cgit v1.2.3