Ignore:
Timestamp:
2008-08-04T14:21:49Z (16 years ago)
Author:
ulim <a.sporto+bee@…>
Branches:
master
Children:
8661caa
Parents:
8a90001
Message:

moved some stuff around in preperation for MSN merge.

  • both ends (proto&dcc) need to finish a transfer now for it to be finished
  • moved throughput calc. and some messages to dcc (no need to implement in protocols)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/jabber/s5bytestream.c

    r8a90001 r4ac647d  
    643643                return jabber_bs_abort( bt, "Remote end closed connection" );
    644644       
    645         if( tf->bytesread == 0 )
    646                 tf->ft->started = time( NULL );
    647 
    648645        tf->bytesread += ret;
     646
     647        if( tf->bytesread >= tf->ft->file_size )
     648                imcb_file_finished( tf->ft );
    649649
    650650        tf->ft->write( tf->ft, tf->ft->buffer, ret );   
     
    701701        ASSERTSOCKOP( ret = send( tf->fd, buffer, len, 0 ), "Sending" );
    702702
    703         if( tf->byteswritten == 0 )
    704                 tf->ft->started = time( NULL );
    705 
    706703        tf->byteswritten += ret;
    707704       
     
    710707                return jabber_bs_abort( bt, "send() sent %d instead of %d (send buffer too big!)", ret, len );
    711708
    712         bt->tf->watch_out = b_input_add( tf->fd, GAIM_INPUT_WRITE, jabber_bs_send_can_write, bt );
     709        if( tf->byteswritten >= ft->file_size )
     710                imcb_file_finished( ft );
     711        else
     712                bt->tf->watch_out = b_input_add( tf->fd, GAIM_INPUT_WRITE, jabber_bs_send_can_write, bt );
    713713               
    714714        return TRUE;
Note: See TracChangeset for help on using the changeset viewer.