aboutsummaryrefslogtreecommitdiffstats
path: root/protocols
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2012-11-09 23:53:45 +0000
committerWilmer van der Gaast <wilmer@gaast.net>2012-11-09 23:53:45 +0000
commit24132ec9af8b275fb4b94e347c6ccce0017c27d0 (patch)
tree6151ab8fc4bf58f3614670a2bc6af8680467ff64 /protocols
parent398b2533afe5860e1b83edb0fcf5d7cf80207162 (diff)
Fixed the last parser (generic handler which just remembers status IDs).
xmltree.h include can almost be removed, it's just used for return values now.
Diffstat (limited to 'protocols')
-rw-r--r--protocols/twitter/twitter_lib.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/protocols/twitter/twitter_lib.c b/protocols/twitter/twitter_lib.c
index c72c317b..cfa2cf06 100644
--- a/protocols/twitter/twitter_lib.c
+++ b/protocols/twitter/twitter_lib.c
@@ -969,7 +969,7 @@ static void twitter_http_post(struct http_request *req)
{
struct im_connection *ic = req->data;
struct twitter_data *td;
- struct xt_node *parsed, *node;
+ json_value *parsed, *id;
// Check if the connection is still active.
if (!g_slist_find(twitter_connections, ic))
@@ -981,9 +981,8 @@ static void twitter_http_post(struct http_request *req)
if (!(parsed = twitter_parse_response(ic, req)))
return;
- if ((node = xt_find_node(parsed, "status")) &&
- (node = xt_find_node(node->children, "id")) && node->text)
- td->last_status_id = g_ascii_strtoull(node->text, NULL, 10);
+ if ((id = json_o_get(parsed, "id")) && id->type == json_integer)
+ td->last_status_id = id->u.integer;
}
/**