From b043ad5e69d91730145ea49305a1fab588c83a93 Mon Sep 17 00:00:00 2001 From: ulim Date: Thu, 8 May 2008 23:20:36 +0200 Subject: allow dcc optimization in progress watcher. Apparently, irssi doesn't send any DCC ACKs if it "feels" that the sender doesn't expect any(no idea how exactly it does that). Anyway, the progress watcher used to check whether the ACKed bytes have increased which it shouldn't do if there aren't any ACKs. --- dcc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'dcc.c') diff --git a/dcc.c b/dcc.c index a6eb511c..0ee894b7 100644 --- a/dcc.c +++ b/dcc.c @@ -184,17 +184,17 @@ gboolean dcc_progress( gpointer data, gint fd, b_input_condition cond ) { struct dcc_file_transfer *df = data; - if( df->ft->bytes_transferred == df->progress_bytes_last ) + if( df->bytes_sent == df->progress_bytes_last ) { /* no progress. cancel */ if( df->bytes_sent == 0 ) return dcc_abort( df, "Couldnt establish transfer within %d seconds", DCC_MAX_STALL ); else - return dcc_abort( df, "Transfer stalled for %d seconds at %d kb", DCC_MAX_STALL, df->ft->bytes_transferred / 1024 ); + return dcc_abort( df, "Transfer stalled for %d seconds at %d kb", DCC_MAX_STALL, df->bytes_sent / 1024 ); } - df->progress_bytes_last = df->ft->bytes_transferred; + df->progress_bytes_last = df->bytes_sent; return TRUE; } -- cgit v1.2.3