diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2010-08-14 14:44:35 +0100 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2010-08-14 14:44:35 +0100 |
commit | 07874bef9e9c4e6ace44e4d0605ce1aec89cad74 (patch) | |
tree | c2a0a0bc30f2fcec7af83b2fb3fe59bbec393116 /protocols/twitter | |
parent | 584867592546f43f857645e02169d135f0df25e8 (diff) | |
parent | 136c2bb632715ab83710c93c7b339c5cca7d2679 (diff) |
Merge mainline stuff.
Diffstat (limited to 'protocols/twitter')
-rw-r--r-- | protocols/twitter/twitter.c | 2 | ||||
-rw-r--r-- | protocols/twitter/twitter_lib.c | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/protocols/twitter/twitter.c b/protocols/twitter/twitter.c index a2f2325c..d5b71bc3 100644 --- a/protocols/twitter/twitter.c +++ b/protocols/twitter/twitter.c @@ -256,7 +256,7 @@ static void twitter_logout( struct im_connection *ic ) struct twitter_data *td = ic->proto_data; // Set the status to logged out. - ic->flags = 0; + ic->flags &= ~ OPT_LOGGED_IN; // Remove the main_loop function from the function queue. b_event_remove(td->main_loop_id); diff --git a/protocols/twitter/twitter_lib.c b/protocols/twitter/twitter_lib.c index f9e808f7..22d2a3bd 100644 --- a/protocols/twitter/twitter_lib.c +++ b/protocols/twitter/twitter_lib.c @@ -356,6 +356,11 @@ static xt_status twitter_xt_get_user_list( struct xt_node *node, struct twitter_ return XT_HANDLED; } +#ifdef __GLIBC__ +#define TWITTER_TIME_FORMAT "%a %b %d %H:%M:%S %z %Y" +#else +#define TWITTER_TIME_FORMAT "%a %b %d %H:%M:%S +0000 %Y" +#endif /** * Function to fill a twitter_xml_status struct. @@ -392,7 +397,7 @@ static xt_status twitter_xt_get_status( struct xt_node *node, struct twitter_xml /* Very sensitive to changes to the formatting of this field. :-( Also assumes the timezone used is UTC since C time handling functions suck. */ - if( strptime( child->text, "%a %b %d %H:%M:%S %z %Y", &parsed ) != NULL ) + if( strptime( child->text, TWITTER_TIME_FORMAT, &parsed ) != NULL ) txs->created_at = mktime_utc( &parsed ); } else if (g_strcasecmp( "user", child->name ) == 0) |