- Timestamp:
- 2011-12-22T11:23:18Z (13 years ago)
- Branches:
- master
- Children:
- d6ddff0
- Parents:
- f1c870a
- Location:
- protocols/jabber
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/jabber/io.c
rf1c870a rad46e4d 173 173 if( st > 0 ) 174 174 { 175 if( jd->flags & JFLAG_MOCK ) 176 return TRUE; 177 175 178 /* Parse. */ 176 179 if( xt_feed( jd->xt, buf, st ) < 0 ) -
protocols/jabber/jabber.c
rf1c870a rad46e4d 336 336 if( g_strcasecmp( who, JABBER_XMLCONSOLE_HANDLE ) == 0 ) 337 337 return jabber_write( ic, message, strlen( message ) ); 338 339 if( g_strcasecmp( who, JABBER_MOCK_HANDLE ) == 0 ) 340 { 341 /* Parse. */ 342 if( xt_feed( jd->xt, message, strlen( message ) ) < 0 ) 343 { 344 imcb_error( ic, "XML stream error" ); 345 imc_logout( ic, TRUE ); 346 return FALSE; 347 } 348 349 /* Execute all handlers. */ 350 if( !xt_handle( jd->xt, NULL, 1 ) ) 351 { 352 /* Don't do anything, the handlers should have 353 aborted the connection already. */ 354 return FALSE; 355 } 356 } 338 357 339 358 if( ( s = strchr( who, '=' ) ) && jabber_chat_by_jid( ic, s + 1 ) ) … … 426 445 { 427 446 jd->flags |= JFLAG_XMLCONSOLE; 428 imcb_add_buddy( ic, JABBER_XMLCONSOLE_HANDLE, NULL ); 447 imcb_add_buddy( ic, who, NULL ); 448 return; 449 } 450 else if( g_strcasecmp( who, JABBER_MOCK_HANDLE ) == 0 ) 451 { 452 jd->flags |= JFLAG_MOCK; 453 imcb_add_buddy( ic, who, NULL ); 429 454 return; 430 455 } … … 446 471 imcb_remove_buddy( ic, JABBER_XMLCONSOLE_HANDLE, NULL ); 447 472 */ 473 return; 474 } 475 else if( g_strcasecmp( who, JABBER_MOCK_HANDLE ) == 0 ) 476 { 477 jd->flags &= ~JFLAG_MOCK; 448 478 return; 449 479 } -
protocols/jabber/jabber.h
rf1c870a rad46e4d 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. */ 49 50 } jabber_flags_t; 50 51 … … 188 189 189 190 #define JABBER_XMLCONSOLE_HANDLE "xmlconsole" 191 #define JABBER_MOCK_HANDLE "mock" 190 192 191 193 /* Prefixes to use for packet IDs (mainly for IQ packets ATM). Usually the
Note: See TracChangeset
for help on using the changeset viewer.