aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2010-06-30 00:30:05 +0100
committerWilmer van der Gaast <wilmer@gaast.net>2010-06-30 00:30:05 +0100
commitbd64716b5687e6652ada7112a43ff3455e32231e (patch)
tree06a6e368a3e4badcdb77d337a6149ad7b7fe4007
parent64f8c425da20554e6909d969b8748076825ef601 (diff)
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.
-rw-r--r--protocols/twitter/twitter_lib.c10
1 files changed, 7 insertions, 3 deletions
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;
}