Changeset 17a6ee9 for protocols/jabber


Ignore:
Timestamp:
2010-04-11T14:37:06Z (15 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
a87e6ba
Parents:
1f92a58
Message:

Including DCC stuff again, with a wonderful extra layer of abstraction.
Some hooks are missing so sending files doesn't work yet. Receiving also
still seems to have some issues. On the plus side, at least the MSN/Jabber
modules work again.

Location:
protocols/jabber
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • protocols/jabber/iq.c

    r1f92a58 r17a6ee9  
    392392                        if( ( strcmp( sub, "both" ) == 0 || strcmp( sub, "to" ) == 0 ) )
    393393                        {
    394                                 if( initial || imcb_find_buddy( ic, jid ) == NULL )
     394                                if( initial || bee_user_by_handle( ic->bee, ic, jid ) == NULL )
    395395                                        imcb_add_buddy( ic, jid, ( group && group->text_len ) ?
    396396                                                                   group->text : NULL );
     
    590590            strcmp( s, "result" ) == 0 )
    591591        {
    592                 if( imcb_find_buddy( ic, jid ) == NULL )
     592                if( bee_user_by_handle( ic->bee, ic, jid ) == NULL )
    593593                        imcb_add_buddy( ic, jid, NULL );
    594594        }
  • protocols/jabber/jabber.c

    r1f92a58 r17a6ee9  
    267267       
    268268        while( jd->filetransfers )
    269                 imcb_file_canceled( ( ( struct jabber_transfer *) jd->filetransfers->data )->ft, "Logging out" );
     269                imcb_file_canceled( ic, ( ( struct jabber_transfer *) jd->filetransfers->data )->ft, "Logging out" );
    270270
    271271        while( jd->streamhosts )
  • protocols/jabber/jabber_util.c

    r1f92a58 r17a6ee9  
    279279        presence_send_request( bla->ic, bla->handle, "subscribed" );
    280280       
    281         if( imcb_find_buddy( bla->ic, bla->handle ) == NULL )
    282                 imcb_ask_add( bla->ic, bla->handle, NULL );
     281        imcb_ask_add( bla->ic, bla->handle, NULL );
    283282       
    284283        g_free( bla->handle );
     
    462461               
    463462                if( bud == NULL && ( flags & GET_BUDDY_CREAT ) &&
    464                     ( bare_exists || imcb_find_buddy( ic, jid ) ) )
     463                    ( bare_exists || bee_user_by_handle( ic->bee, ic, jid ) ) )
    465464                {
    466465                        *s = '/';
     
    483482                if( bud == NULL )
    484483                        /* No match. Create it now? */
    485                         return ( ( flags & GET_BUDDY_CREAT ) && imcb_find_buddy( ic, jid_ ) ) ?
     484                        return ( ( flags & GET_BUDDY_CREAT ) &&
     485                                 bee_user_by_handle( ic->bee, ic, jid_ ) ) ?
    486486                                   jabber_buddy_add( ic, jid_ ) : NULL;
    487487                else if( bud->resource && ( flags & GET_BUDDY_EXACT ) )
  • protocols/jabber/s5bytestream.c

    r1f92a58 r17a6ee9  
    566566        xt_free_node( reply );
    567567
    568         imcb_file_canceled( tf->ft, "couldn't connect to any streamhosts" );
     568        imcb_file_canceled( tf->ic, tf->ft, "couldn't connect to any streamhosts" );
    569569
    570570        bt->tf->watch_in = 0;
     
    603603               
    604604        if( !jabber_write_packet( tf->ic, reply ) )
    605                 imcb_file_canceled( tf->ft, "Error transmitting bytestream response" );
     605                imcb_file_canceled( tf->ic, tf->ft, "Error transmitting bytestream response" );
    606606        xt_free_node( reply );
    607607}
     
    643643
    644644        if( tf->bytesread >= tf->ft->file_size )
    645                 imcb_file_finished( tf->ft );
     645                imcb_file_finished( tf->ic, tf->ft );
    646646
    647647        tf->ft->write( tf->ft, tf->ft->buffer, ret );   
     
    659659        if( tf->watch_in )
    660660        {
    661                 imcb_file_canceled( ft, "BUG in jabber file transfer: write_request called when already watching for input" );
     661                imcb_file_canceled( tf->ic, ft, "BUG in jabber file transfer: write_request called when already watching for input" );
    662662                return FALSE;
    663663        }
     
    705705
    706706        if( tf->byteswritten >= ft->file_size )
    707                 imcb_file_finished( ft );
     707                imcb_file_finished( tf->ic, ft );
    708708        else
    709709                bt->tf->watch_out = b_input_add( tf->fd, GAIM_INPUT_WRITE, jabber_bs_send_can_write, bt );
     
    10051005
    10061006        if( !jabber_write_packet( tf->ic, iq ) )
    1007                 imcb_file_canceled( tf->ft, "Error transmitting bytestream request" );
     1007                imcb_file_canceled( tf->ic, tf->ft, "Error transmitting bytestream request" );
    10081008        return TRUE;
    10091009}
     
    10201020
    10211021        if( jd->streamhosts==NULL ) /* we're done here unless we have a proxy to try */
    1022                 imcb_file_canceled( tf->ft, error );
     1022                imcb_file_canceled( tf->ic, tf->ft, error );
    10231023
    10241024        /* MUST always return FALSE! */
  • protocols/jabber/si.c

    r1f92a58 r17a6ee9  
    9191
    9292        if( !foundft )
    93                 imcb_file_canceled( tf->ft, "Buddy's client doesn't feature file transfers" );
     93                imcb_file_canceled( tf->ic, tf->ft, "Buddy's client doesn't feature file transfers" );
    9494        else if( !foundbt )
    95                 imcb_file_canceled( tf->ft, "Buddy's client doesn't feature byte streams (required)" );
     95                imcb_file_canceled( tf->ic, tf->ft, "Buddy's client doesn't feature byte streams (required)" );
    9696        else if( !foundsi )
    97                 imcb_file_canceled( tf->ft, "Buddy's client doesn't feature stream initiation (required)" );
     97                imcb_file_canceled( tf->ic, tf->ft, "Buddy's client doesn't feature stream initiation (required)" );
    9898               
    9999        return foundft && foundbt && foundsi;
     
    109109
    110110        /* and start the receive logic */
    111         imcb_file_recv_start( tf->ft );
     111        imcb_file_recv_start( tf->ic, tf->ft );
    112112
    113113}
     
    156156        if( bud == NULL )
    157157        {
    158                 imcb_file_canceled( ft, "Couldn't find buddy (BUG?)" );
     158                imcb_file_canceled( ic, ft, "Couldn't find buddy (BUG?)" );
    159159                return;
    160160        }
Note: See TracChangeset for help on using the changeset viewer.