diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2014-04-13 12:52:25 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2014-04-13 12:52:25 +0200 |
commit | db912ded26f15ff64e34a4667a34d1a882d82ad9 (patch) | |
tree | 2648da96b4a287d5321f91cc2ac91924f0cee502 /src/plugins/xfer/xfer-network.c | |
parent | 417811ba018f02ec0110f1b9899e17dcd2b394f7 (diff) | |
download | weechat-db912ded26f15ff64e34a4667a34d1a882d82ad9.zip |
xfer: fix freeze/problems when sending empty files with DCC (closes #53)
Diffstat (limited to 'src/plugins/xfer/xfer-network.c')
-rw-r--r-- | src/plugins/xfer/xfer-network.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/plugins/xfer/xfer-network.c b/src/plugins/xfer/xfer-network.c index d0ff2dd62..a2f06764f 100644 --- a/src/plugins/xfer/xfer-network.c +++ b/src/plugins/xfer/xfer-network.c @@ -225,16 +225,14 @@ xfer_network_send_file_fork (struct t_xfer *xfer) switch (pid = fork ()) { - /* fork failed */ - case -1: + case -1: /* fork failed */ weechat_printf (NULL, _("%s%s: unable to fork"), weechat_prefix ("error"), XFER_PLUGIN_NAME); xfer_close (xfer, XFER_STATUS_FAILED); xfer_buffer_refresh (WEECHAT_HOTLIST_MESSAGE); return; - /* child process */ - case 0: + case 0: /* child process */ rc = setuid (getuid ()); (void) rc; close (xfer->child_read); @@ -298,16 +296,14 @@ xfer_network_recv_file_fork (struct t_xfer *xfer) switch (pid = fork ()) { - /* fork failed */ - case -1: + case -1: /* fork failed */ weechat_printf (NULL, _("%s%s: unable to fork"), weechat_prefix ("error"), XFER_PLUGIN_NAME); xfer_close (xfer, XFER_STATUS_FAILED); xfer_buffer_refresh (WEECHAT_HOTLIST_MESSAGE); return; - /* child process */ - case 0: + case 0: /* child process */ rc = setuid (getuid ()); (void) rc; close (xfer->child_read); |