Changeset 24132ec


Ignore:
Timestamp:
2012-11-09T23:53:45Z (11 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
9e8c945
Parents:
398b2533
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/twitter/twitter_lib.c

    r398b2533 r24132ec  
    970970        struct im_connection *ic = req->data;
    971971        struct twitter_data *td;
    972         struct xt_node *parsed, *node;
     972        json_value *parsed, *id;
    973973
    974974        // Check if the connection is still active.
     
    982982                return;
    983983       
    984         if ((node = xt_find_node(parsed, "status")) &&
    985             (node = xt_find_node(node->children, "id")) && node->text)
    986                 td->last_status_id = g_ascii_strtoull(node->text, NULL, 10);
     984        if ((id = json_o_get(parsed, "id")) && id->type == json_integer)
     985                td->last_status_id = id->u.integer;
    987986}
    988987
Note: See TracChangeset for help on using the changeset viewer.