1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-12 14:14:48 +02:00

xfer: fix DCC transfer error (bug #37432)

This commit is contained in:
Sebastien Helleu
2012-09-24 21:56:24 +02:00
parent 7eb70ccecd
commit 5f8a7e8d31
2 changed files with 5 additions and 4 deletions
+2 -1
View File
@@ -1,7 +1,7 @@
WeeChat ChangeLog
=================
Sébastien Helleu <flashcode@flashtux.org>
v0.3.9-rc2, 2012-09-21
v0.3.9-rc2, 2012-09-24
Version 0.3.9 (under dev!)
@@ -120,6 +120,7 @@ Version 0.3.9 (under dev!)
missing call to unhook
* scripts: ignore call to "register" (with a warning) if script is already
registered
* xfer: fix DCC transfer error (bug #37432)
Version 0.3.8 (2012-06-03)
--------------------------
+3 -3
View File
@@ -73,7 +73,7 @@ xfer_dcc_send_file_child (struct t_xfer *xfer)
{
num_read = recv (xfer->sock, (char *) &ack, 4, MSG_PEEK);
if ((num_read < 1) &&
((num_read != -1) || (errno != EAGAIN)))
((num_read != -1) || ((errno != EAGAIN) && (errno != EWOULDBLOCK))))
{
xfer_network_write_pipe (xfer, XFER_STATUS_FAILED,
XFER_ERROR_SEND_BLOCK);
@@ -125,7 +125,7 @@ xfer_dcc_send_file_child (struct t_xfer *xfer)
* socket is temporarily not available (receiver can't
* receive amount of data we sent ?!)
*/
if (errno == EAGAIN)
if ((errno == EAGAIN) || (errno == EWOULDBLOCK))
usleep (1000);
else
{
@@ -206,7 +206,7 @@ xfer_dcc_recv_file_child (struct t_xfer *xfer)
if (num_read == -1)
{
/* socket is temporarily not available (sender is not fast ?!) */
if ((errno == EAGAIN) || (errno == EINTR))
if ((errno == EAGAIN) || (errno == EWOULDBLOCK) || (errno == EINTR))
usleep (1000);
else
{