# HG changeset patch # User Yoshiki Yazawa # Date 1244883279 -32400 # Node ID 227e59f017f2045b6e9a9a82fbf8e644559e4309 # Parent 6c8942296a4701e44aec07a394cd38046f52c024 status id now exceeds int32 limit. diff -r 6c8942296a47 -r 227e59f017f2 pidgin-twitter.h --- a/pidgin-twitter.h Sat Jun 13 15:45:10 2009 +0900 +++ b/pidgin-twitter.h Sat Jun 13 17:54:39 2009 +0900 @@ -93,7 +93,7 @@ gchar *screen_name; gchar *profile_image_url; time_t time; - guint id; + guint64 id; } status_t; typedef struct _source { diff -r 6c8942296a47 -r 227e59f017f2 twitter_api.c --- a/twitter_api.c Sat Jun 13 15:45:10 2009 +0900 +++ b/twitter_api.c Sat Jun 13 17:54:39 2009 +0900 @@ -9,7 +9,7 @@ static void parse_status(xmlNode *status, status_t *st); static void free_status(status_t *st); -static gboolean is_posted_message(status_t *status, guint lastid); +static gboolean is_posted_message(status_t *status, guint64 lastid); static void get_status_with_api_cb(PurpleUtilFetchUrlData *url_data, gpointer user_data, const gchar *url_text, size_t len, const gchar *error_message); static void post_status_with_api_cb(PurpleUtilFetchUrlData *url_data, gpointer user_data, const gchar *url_text, size_t len, const gchar *error_message); @@ -32,6 +32,7 @@ if(!xmlStrcmp(nptr->name, (xmlChar *)"screen_name")) { gchar *str = (gchar *)xmlNodeGetContent(nptr); st->screen_name = g_strdup(str); + twitter_debug("screen_name=%s\n", st->screen_name); xmlFree(str); } else if(!xmlStrcmp(nptr->name, (xmlChar *)"profile_image_url")) { @@ -136,7 +137,8 @@ } else if(!xmlStrcmp(nptr->name, (xmlChar *)"id")) { gchar *str = (gchar *)xmlNodeGetContent(nptr); - st->id = atoi(str); + st->id = atoll(str); + twitter_debug("id=%lld\n", st->id); xmlFree(str); } else if(!xmlStrcmp(nptr->name, (xmlChar *)"text")) { @@ -161,7 +163,7 @@ } static gboolean -is_posted_message(status_t *status, guint lastid) +is_posted_message(status_t *status, guint64 lastid) { GList *pp = g_list_first(postedlist); gboolean rv = FALSE; @@ -196,7 +198,7 @@ { xmlDocPtr doc; xmlNode *nptr, *nptr2; - static guint lastid = 0; + static guint64 lastid = 0; PurpleConversation *conv; GList *stp; const gchar *start; @@ -261,7 +263,7 @@ msg = g_strdup_printf("%s: %s", st->screen_name, st->text); - /* apply filter*/ + /* apply filter */ if(purple_prefs_get_bool(OPT_FILTER)) { apply_filter(&sender, &msg, &flag, twitter_service); }