summaryrefslogtreecommitdiff
path: root/src/irc
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2002-02-10 18:42:23 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2002-02-10 18:42:23 +0000
commit64e98b7f4a9c2f4232d88f0c8e9d9f5e317fd6b7 (patch)
tree6fdfe381f306d20855644074f4d2c0b70a882501 /src/irc
parent0dc3e3f0ddd0503c14c5df98d059028ec4e6d17d (diff)
downloadirssi-64e98b7f4a9c2f4232d88f0c8e9d9f5e317fd6b7.zip
Correctly handle DCC GET write() failures.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2427 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/irc')
-rw-r--r--src/irc/dcc/dcc-get.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/irc/dcc/dcc-get.c b/src/irc/dcc/dcc-get.c
index 52c93483..d13f8376 100644
--- a/src/irc/dcc/dcc-get.c
+++ b/src/irc/dcc/dcc-get.c
@@ -154,7 +154,13 @@ static void sig_dccget_receive(GET_DCC_REC *dcc)
return;
}
- write(dcc->fhandle, buffer, ret);
+ if (write(dcc->fhandle, buffer, ret) != ret) {
+ /* most probably out of disk space */
+ signal_emit("dcc error write", 2,
+ dcc, g_strerror(errno));
+ dcc_close(DCC(dcc));
+ return;
+ }
dcc->transfd += ret;
}