Ignore:
Timestamp:
2010-04-06T17:25:51Z (14 years ago)
Author:
Geert Mulders <g.c.w.m.mulders@…>
Branches:
master
Children:
0519b0a
Parents:
62d2cfb
Message:

Updates made as a result to the comments on the review.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/twitter/twitter_lib.c

    r62d2cfb r2abceca  
    6565        g_free(txu->name);
    6666        g_free(txu->screen_name);
     67        g_free(txu);
    6768}
    6869
     
    7677        g_free(txs->text);
    7778        txu_free(txs->user);
     79        g_free(txs);
    7880}
    7981
     
    131133{
    132134        // Do something with the cursor.
    133         txl->next_cursor = atoi(node->text);
     135        txl->next_cursor = node->text != NULL ? atoi(node->text) : -1;
    134136
    135137        return XT_HANDLED;
     
    153155                {
    154156                        // Add the item to the list.
    155                         txl->list = g_slist_append (txl->list, g_memdup( node->text, node->text_len + 1 ));
     157                        txl->list = g_slist_append (txl->list, g_memdup( child->text, child->text_len + 1 ));
    156158                }
    157159                else if ( g_strcasecmp( "next_cursor", child->name ) == 0)
     
    187189
    188190        txl = g_new0(struct twitter_xml_list, 1);
    189         txl->list = NULL;
    190191
    191192        // Parse the data.
     
    451452        if (req->status_code != 200) {
    452453                // It didn't go well, output the error and return.
    453                 imcb_error(ic, "Could not retrieve home/timeline. HTTP STATUS: %d", req->status_code);
     454                imcb_error(ic, "Could not retrieve " TWITTER_HOME_TIMELINE_URL ". HTTP STATUS: %d", req->status_code);
    454455                return;
    455456        }
     
    488489        struct xt_parser *parser;
    489490        struct twitter_xml_list *txl;
     491        GSList *l = NULL;
     492        struct twitter_xml_user *user;
    490493
    491494        // Check if the connection is still active.
     
    496499        if (req->status_code != 200) {
    497500                // It didn't go well, output the error and return.
    498                 imcb_error(ic, "Could not retrieve home/timeline. HTTP STATUS: %d", req->status_code);
     501                imcb_error(ic, "Could not retrieve " TWITTER_SHOW_FRIENDS_URL " HTTP STATUS: %d", req->status_code);
    499502                return;
    500503        }
     
    511514        xt_free( parser );
    512515
    513         GSList *l = NULL;
    514         struct twitter_xml_user *user;
    515516        // Add the users as buddies.
    516517        for ( l = txl->list; l ; l = g_slist_next(l) )
     
    559560        if (req->status_code != 200) {
    560561                // It didn't go well, output the error and return.
    561                 imcb_error(ic, "Could not post tweed... HTTP STATUS: %d", req->status_code);
    562                 imcb_error(ic, req->reply_body);
     562                imcb_error(ic, "Could not post tweet... HTTP STATUS: %d", req->status_code);
    563563                return;
    564564        }
Note: See TracChangeset for help on using the changeset viewer.