Mercurial > gftp.yaz
diff lib/protocols.c @ 248:16a967a4d003
2003-8-7 Brian Masney <masneyb@gftp.org>
* lib/protocols.c (gftp_fd_write) - use a signed variable to store the
result from write(). Write errors were not being caught properly.
| author | masneyb |
|---|---|
| date | Fri, 08 Aug 2003 01:38:12 +0000 |
| parents | 41af60bc1f88 |
| children | 094e83b55cb1 |
line wrap: on
line diff
--- a/lib/protocols.c Wed Aug 06 20:31:34 2003 +0000 +++ b/lib/protocols.c Fri Aug 08 01:38:12 2003 +0000 @@ -2164,8 +2164,9 @@ { long network_timeout; struct timeval tv; - size_t ret, w_ret; + ssize_t w_ret; fd_set fset; + size_t ret; gftp_lookup_request_option (request, "network_timeout", &network_timeout); @@ -2197,7 +2198,8 @@ return (GFTP_ERETRYABLE); } - if ((w_ret = write (fd, ptr, size)) < 0) + w_ret = write (fd, ptr, size); + if (w_ret < 0) { if (errno == EINTR) {
