Changeset 96f954d
- Timestamp:
- 2011-12-24T17:49:12Z (13 years ago)
- Branches:
- master
- Children:
- 164352e, 5f40da7
- Parents:
- 5513f3e
- Location:
- protocols/jabber
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/jabber/io.c
r5513f3e r96f954d 173 173 if( st > 0 ) 174 174 { 175 if( jd->flags & JFLAG_MOCK )176 return TRUE;177 178 175 /* Parse. */ 179 176 if( xt_feed( jd->xt, buf, st ) < 0 ) -
protocols/jabber/jabber.c
r5513f3e r96f954d 339 339 if( g_strcasecmp( who, JABBER_XMLCONSOLE_HANDLE ) == 0 ) 340 340 return jabber_write( ic, message, strlen( message ) ); 341 342 if( g_strcasecmp( who, JABBER_MOCK_HANDLE ) == 0 )343 {344 /* Parse. */345 if( xt_feed( jd->xt, message, strlen( message ) ) < 0 )346 {347 imcb_error( ic, "XML stream error" );348 imc_logout( ic, TRUE );349 return FALSE;350 }351 352 /* Execute all handlers. */353 if( !xt_handle( jd->xt, NULL, 1 ) )354 {355 /* Don't do anything, the handlers should have356 aborted the connection already. */357 return FALSE;358 }359 }360 341 361 342 if( ( s = strchr( who, '=' ) ) && jabber_chat_by_jid( ic, s + 1 ) ) … … 448 429 { 449 430 jd->flags |= JFLAG_XMLCONSOLE; 450 imcb_add_buddy( ic, who, NULL ); 451 return; 452 } 453 else if( g_strcasecmp( who, JABBER_MOCK_HANDLE ) == 0 ) 454 { 455 jd->flags |= JFLAG_MOCK; 456 imcb_add_buddy( ic, who, NULL ); 431 imcb_add_buddy( ic, JABBER_XMLCONSOLE_HANDLE, NULL ); 457 432 return; 458 433 } … … 474 449 imcb_remove_buddy( ic, JABBER_XMLCONSOLE_HANDLE, NULL ); 475 450 */ 476 return;477 }478 else if( g_strcasecmp( who, JABBER_MOCK_HANDLE ) == 0 )479 {480 jd->flags &= ~JFLAG_MOCK;481 451 return; 482 452 } -
protocols/jabber/jabber.h
r5513f3e r96f954d 47 47 JFLAG_XMLCONSOLE = 64, /* If the user added an xmlconsole buddy. */ 48 48 JFLAG_STARTTLS_DONE = 128, /* If a plaintext session was converted to TLS. */ 49 JFLAG_MOCK = 256, /* If the user added a mock buddy. */50 49 } jabber_flags_t; 51 50 … … 189 188 190 189 #define JABBER_XMLCONSOLE_HANDLE "xmlconsole" 191 #define JABBER_MOCK_HANDLE "mock"192 190 193 191 /* Prefixes to use for packet IDs (mainly for IQ packets ATM). Usually the
Note: See TracChangeset
for help on using the changeset viewer.