# HG changeset patch # User masneyb # Date 1159269991 0 # Node ID cfa4ec2fb98f95398d2c3ea60aacfe5a47b7df02 # Parent 214d7e6ea78b1804f854f7e4986f497e53b2462c 2006-9-26 Brian Masney * lib/protocols.c (gftp_fd_read, gftp_fd_write) - make sure the return value properly matches what was actually read or written to the socket diff -r 214d7e6ea78b -r cfa4ec2fb98f ChangeLog --- a/ChangeLog Tue Sep 26 10:56:33 2006 +0000 +++ b/ChangeLog Tue Sep 26 11:26:31 2006 +0000 @@ -1,4 +1,7 @@ 2006-9-26 Brian Masney + * lib/protocols.c (gftp_fd_read, gftp_fd_write) - make sure the return + value properly matches what was actually read or written to the socket + * lib/rfc959.c - added rfc959_close_data_connection() 2006-9-15 Brian Masney @@ -3584,7 +3587,7 @@ * cvsclean - added this script - * *.[ch] - added $Id: ChangeLog,v 1.474 2006/09/26 10:56:33 masneyb Exp $ tags + * *.[ch] - added $Id: ChangeLog,v 1.475 2006/09/26 11:26:31 masneyb Exp $ tags * debian/* - updated files from Debian maintainer diff -r 214d7e6ea78b -r cfa4ec2fb98f lib/protocols.c --- a/lib/protocols.c Tue Sep 26 10:56:33 2006 +0000 +++ b/lib/protocols.c Tue Sep 26 11:26:31 2006 +0000 @@ -2662,6 +2662,7 @@ struct timeval tv; fd_set fset; ssize_t ret; + int s_ret; g_return_val_if_fail (fd >= 0, GFTP_EFATAL); @@ -2676,8 +2677,8 @@ FD_SET (fd, &fset); tv.tv_sec = network_timeout; tv.tv_usec = 0; - ret = select (fd + 1, &fset, NULL, NULL, &tv); - if (ret == -1 && (errno == EINTR || errno == EAGAIN)) + s_ret = select (fd + 1, &fset, NULL, NULL, &tv); + if (s_ret == -1 && (errno == EINTR || errno == EAGAIN)) { if (request != NULL && request->cancel) { @@ -2687,7 +2688,7 @@ continue; } - else if (ret <= 0) + else if (s_ret <= 0) { if (request != NULL) { @@ -2737,9 +2738,9 @@ { intptr_t network_timeout; struct timeval tv; + int ret, s_ret; ssize_t w_ret; fd_set fset; - int ret; g_return_val_if_fail (fd >= 0, GFTP_EFATAL); @@ -2753,8 +2754,8 @@ FD_SET (fd, &fset); tv.tv_sec = network_timeout; tv.tv_usec = 0; - ret = select (fd + 1, NULL, &fset, NULL, &tv); - if (ret == -1 && (errno == EINTR || errno == EAGAIN)) + s_ret = select (fd + 1, NULL, &fset, NULL, &tv); + if (s_ret == -1 && (errno == EINTR || errno == EAGAIN)) { if (request != NULL && request->cancel) { @@ -2764,7 +2765,7 @@ continue; } - else if (ret <= 0) + else if (s_ret <= 0) { if (request != NULL) {