Ignore:
Timestamp:
2011-04-18T14:14:08Z (13 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
2423c93
Parents:
6cc36ef
Message:

Try to show better Twitter error messages. Sadly this doesn't always work
since Twitter can't seem to make up their mind on the formatting of their
error responses, sometimes using XML and sometimes plain text.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/twitter/twitter_lib.c

    r6cc36ef r6eca2eb  
    142142/* Warning: May return a malloc()ed value, which will be free()d on the next
    143143   call. Only for short-term use. */
    144 static char *twitter_parse_error(struct http_request *req)
     144char *twitter_parse_error(struct http_request *req)
    145145{
    146146        static char *ret = NULL;
     
    161161                {
    162162                        ret = g_strdup_printf("%s (%s)", req->status_string, node->text);
    163                         xt_free(xp);
    164                         return ret;
    165163                }
    166164               
     
    168166        }
    169167       
    170         return req->status_string;
     168        return ret ? ret : req->status_string;
    171169}
    172170
Note: See TracChangeset for help on using the changeset viewer.