diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2006-09-30 06:52:52 +0000 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2006-09-30 06:52:52 +0000 |
commit | 80a76f65f675cf0b27ebde99d87f35a5e04e9b5d (patch) | |
tree | 45f989a955da13599ff81be6ed6243648ba4ad66 /src/irc/irc-dcc.c | |
parent | 9f035d8f9188f9d353dfc4f0a1f1103c2b43d83c (diff) | |
download | weechat-80a76f65f675cf0b27ebde99d87f35a5e04e9b5d.zip |
Fixed crash for DCC receiver when resuming a file (bug #17885), fixed DCC error for sender when receiver cancels DCC (bug #17852)
Diffstat (limited to 'src/irc/irc-dcc.c')
-rw-r--r-- | src/irc/irc-dcc.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/irc/irc-dcc.c b/src/irc/irc-dcc.c index dc9f3f843..6a7e225c9 100644 --- a/src/irc/irc-dcc.c +++ b/src/irc/irc-dcc.c @@ -1421,7 +1421,7 @@ dcc_file_send_child (t_irc_dcc *ptr_dcc) if ((num_read < 1) && ((num_read != -1) || (errno != EAGAIN))) { - dcc_file_write_pipe (ptr_dcc, DCC_FAILED, DCC_ERROR_READ_LOCAL); + dcc_file_write_pipe (ptr_dcc, DCC_FAILED, DCC_ERROR_SEND_BLOCK); return; } if (num_read == 4) @@ -1462,7 +1462,7 @@ dcc_file_send_child (t_irc_dcc *ptr_dcc) usleep (1000); else { - dcc_file_write_pipe (ptr_dcc, DCC_FAILED, DCC_ERROR_READ_LOCAL); + dcc_file_write_pipe (ptr_dcc, DCC_FAILED, DCC_ERROR_SEND_BLOCK); return; } } @@ -1830,7 +1830,8 @@ dcc_handle () } if (ptr_dcc->type == DCC_FILE_RECV) { - dcc_file_child_read (ptr_dcc); + if (ptr_dcc->child_read != -1) + dcc_file_child_read (ptr_dcc); } } |