diff options
author | Timo Sirainen <cras@irssi.org> | 2002-02-10 18:42:23 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2002-02-10 18:42:23 +0000 |
commit | 64e98b7f4a9c2f4232d88f0c8e9d9f5e317fd6b7 (patch) | |
tree | 6fdfe381f306d20855644074f4d2c0b70a882501 /src/irc/dcc/dcc-get.c | |
parent | 0dc3e3f0ddd0503c14c5df98d059028ec4e6d17d (diff) | |
download | irssi-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/dcc/dcc-get.c')
-rw-r--r-- | src/irc/dcc/dcc-get.c | 8 |
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; } |