- Timestamp:
- 2010-08-14T13:44:35Z (14 years ago)
- Branches:
- master
- Children:
- e5854a8
- Parents:
- 5848675 (diff), 136c2bb (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- protocols
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/jabber/jabber.c
r5848675 r07874be 96 96 struct im_connection *ic = imcb_new( acc ); 97 97 struct jabber_data *jd = g_new0( struct jabber_data, 1 ); 98 struct ns_srv_reply * srv = NULL;98 struct ns_srv_reply **srvl = NULL, *srv = NULL; 99 99 char *connect_to, *s; 100 100 int i; … … 196 196 if( acc->server && *acc->server ) 197 197 connect_to = acc->server; 198 else if( ( srv = srv_lookup( "xmpp-client", "tcp", jd->server ) ) || 199 ( srv = srv_lookup( "jabber-client", "tcp", jd->server ) ) ) 198 else if( ( srvl = srv_lookup( "xmpp-client", "tcp", jd->server ) ) || 199 ( srvl = srv_lookup( "jabber-client", "tcp", jd->server ) ) ) 200 { 201 /* Find the lowest-priority one. These usually come 202 back in random/shuffled order. Not looking at 203 weights etc for now. */ 204 srv = *srvl; 205 for( i = 1; srvl[i]; i ++ ) 206 if( srvl[i]->prio < srv->prio ) 207 srv = srvl[i]; 208 200 209 connect_to = srv->name; 210 } 201 211 else 202 212 connect_to = jd->server; … … 227 237 jd->fd = proxy_connect( connect_to, srv ? srv->port : set_getint( &acc->set, "port" ), jabber_connected_plain, ic ); 228 238 } 229 g_free( srv);239 srv_free( srvl ); 230 240 231 241 if( jd->fd == -1 ) -
protocols/twitter/twitter.c
r5848675 r07874be 257 257 258 258 // Set the status to logged out. 259 ic->flags = 0;259 ic->flags &= ~ OPT_LOGGED_IN; 260 260 261 261 // Remove the main_loop function from the function queue. -
protocols/twitter/twitter_lib.c
r5848675 r07874be 357 357 } 358 358 359 #ifdef __GLIBC__ 360 #define TWITTER_TIME_FORMAT "%a %b %d %H:%M:%S %z %Y" 361 #else 362 #define TWITTER_TIME_FORMAT "%a %b %d %H:%M:%S +0000 %Y" 363 #endif 359 364 360 365 /** … … 393 398 this field. :-( Also assumes the timezone used 394 399 is UTC since C time handling functions suck. */ 395 if( strptime( child->text, "%a %b %d %H:%M:%S %z %Y", &parsed ) != NULL )400 if( strptime( child->text, TWITTER_TIME_FORMAT, &parsed ) != NULL ) 396 401 txs->created_at = mktime_utc( &parsed ); 397 402 }
Note: See TracChangeset
for help on using the changeset viewer.