diff options
author | ulim <a.sporto+bee@gmail.com> | 2008-05-08 23:20:36 +0200 |
---|---|---|
committer | ulim <a.sporto+bee@gmail.com> | 2008-05-08 23:20:36 +0200 |
commit | b043ad5e69d91730145ea49305a1fab588c83a93 (patch) | |
tree | 14985c6e39d6fede1675812a7fa9522787e505cf /dcc.c | |
parent | 44961cb326fde3cb681a79eb28becb74a921a29d (diff) |
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.
Diffstat (limited to 'dcc.c')
-rw-r--r-- | dcc.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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; } |