summaryrefslogtreecommitdiff
path: root/src/irc/dcc/dcc-get.c
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2001-02-19 03:40:06 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2001-02-19 03:40:06 +0000
commit19dff227d804e17c85afb38e3621cd60856bc50e (patch)
tree379b16b08c29151bc62686435bad937deb200fa3 /src/irc/dcc/dcc-get.c
parentc1c7674ae2eee9be7717394f9eab66c0f01db63e (diff)
downloadirssi-19dff227d804e17c85afb38e3621cd60856bc50e.zip
Removed /SET dcc_block_size and /SET dcc_fast_send - fast send is now
always used and dcc_block_size is useless with it. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1250 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/irc/dcc/dcc-get.c')
-rw-r--r--src/irc/dcc/dcc-get.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/irc/dcc/dcc-get.c b/src/irc/dcc/dcc-get.c
index c1596afa..df51c837 100644
--- a/src/irc/dcc/dcc-get.c
+++ b/src/irc/dcc/dcc-get.c
@@ -139,10 +139,11 @@ static void sig_dccget_send(GET_DCC_REC *dcc)
/* input function: DCC GET received data */
static void sig_dccget_receive(GET_DCC_REC *dcc)
{
+ char buffer[512];
int ret;
for (;;) {
- ret = net_receive(dcc->handle, dcc->databuf, dcc->databufsize);
+ ret = net_receive(dcc->handle, buffer, sizeof(buffer));
if (ret == 0) break;
if (ret < 0) {
@@ -152,7 +153,7 @@ static void sig_dccget_receive(GET_DCC_REC *dcc)
return;
}
- write(dcc->fhandle, dcc->databuf, ret);
+ write(dcc->fhandle, buffer, ret);
dcc->transfd += ret;
}
@@ -203,10 +204,6 @@ static void sig_dccget_connected(GET_DCC_REC *dcc)
}
}
- dcc->databufsize = settings_get_int("dcc_block_size");
- if (dcc->databufsize <= 0) dcc->databufsize = 2048;
- dcc->databuf = g_malloc(dcc->databufsize);
-
dcc->starttime = time(NULL);
dcc->tagread = g_input_add(dcc->handle, G_INPUT_READ,
(GInputFunction) sig_dccget_receive, dcc);