Changeset 34ded90 for protocols/jabber
- Timestamp:
- 2011-12-24T18:09:05Z (13 years ago)
- Branches:
- master
- Children:
- 9a1c14d
- Parents:
- 164352e
- Location:
- protocols/jabber
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/jabber/jabber.c
r164352e r34ded90 90 90 s = set_add( &acc->set, "tls_verify", "true", set_eval_bool, acc ); 91 91 s->flags |= ACC_SET_OFFLINE_ONLY; 92 92 93 93 s = set_add( &acc->set, "user_agent", "BitlBee", NULL, acc ); 94 94 … … 337 337 return jabber_write( ic, message, strlen( message ) ); 338 338 339 if( g_strcasecmp( who, "jabber_oauth" ) == 0 ) 339 if( g_strcasecmp( who, JABBER_OAUTH_HANDLE ) == 0 && 340 !( jd->flags & OPT_LOGGED_IN ) && jd->fd == -1 ) 340 341 { 341 342 if( sasl_oauth2_get_refresh_token( ic, message ) ) -
protocols/jabber/jabber.h
r164352e r34ded90 194 194 195 195 #define JABBER_XMLCONSOLE_HANDLE "xmlconsole" 196 #define JABBER_OAUTH_HANDLE "jabber_oauth" 196 197 197 198 /* Prefixes to use for packet IDs (mainly for IQ packets ATM). Usually the -
protocols/jabber/sasl.c
r164352e r34ded90 462 462 463 463 /* Temporary contact, just used to receive the OAuth response. */ 464 imcb_add_buddy( ic, "jabber_oauth", NULL );464 imcb_add_buddy( ic, JABBER_OAUTH_HANDLE, NULL ); 465 465 url = oauth2_url( jd->oauth2_service ); 466 466 msg = g_strdup_printf( "Open this URL in your browser to authenticate: %s", url ); 467 imcb_buddy_msg( ic, "jabber_oauth", msg, 0, 0 );468 imcb_buddy_msg( ic, "jabber_oauth", "Respond to this message with the returned "469 "authorization token.", 0, 0 );467 imcb_buddy_msg( ic, JABBER_OAUTH_HANDLE, msg, 0, 0 ); 468 imcb_buddy_msg( ic, JABBER_OAUTH_HANDLE, "Respond to this message with the returned " 469 "authorization token.", 0, 0 ); 470 470 471 471 g_free( msg ); … … 477 477 struct im_connection *ic = data; 478 478 if( g_slist_find( jabber_connections, ic ) ) 479 imcb_remove_buddy( ic, "jabber_oauth", NULL );479 imcb_remove_buddy( ic, JABBER_OAUTH_HANDLE, NULL ); 480 480 return FALSE; 481 481 }
Note: See TracChangeset
for help on using the changeset viewer.