aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorulim <a.sporto+bee@gmail.com>2008-05-08 23:20:36 +0200
committerulim <a.sporto+bee@gmail.com>2008-05-08 23:20:36 +0200
commitb043ad5e69d91730145ea49305a1fab588c83a93 (patch)
tree14985c6e39d6fede1675812a7fa9522787e505cf
parent44961cb326fde3cb681a79eb28becb74a921a29d (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.
-rw-r--r--dcc.c6
1 files changed, 3 insertions, 3 deletions
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;
}