changeset 813:11159114bb97

2006-9-15 Brian Masney <masneyb@gftp.org> * lib/protocols.c (gftp_fd_write, gftp_fd_read, gftp_fd_set_sockblocking) - added checks to make sure the file descriptor is not set to -1 (gftp_abort_transfer) - added FIXME comment
author masneyb
date Fri, 15 Sep 2006 11:26:05 +0000
parents 3f1d3d35620b
children e80d006ad570
files ChangeLog lib/protocols.c
diffstat 2 files changed, 14 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Sep 15 08:20:46 2006 +0000
+++ b/ChangeLog	Fri Sep 15 11:26:05 2006 +0000
@@ -1,3 +1,9 @@
+2006-9-15 Brian Masney <masneyb@gftp.org>
+	* lib/protocols.c (gftp_fd_write, gftp_fd_read,
+	gftp_fd_set_sockblocking) - added checks to make sure the file
+	descriptor is not set to -1 (gftp_abort_transfer) - added FIXME
+	comment
+
 2006-9-14 Brian Masney <masneyb@gftp.org>
 	* src/uicommon/gftpui.c - added _do_transfer_file(). This will take
 	care of the actual file transfer. It will also make sure that the
@@ -3575,7 +3581,7 @@
 
 	* cvsclean - added this script
 
-	* *.[ch] - added $Id: ChangeLog,v 1.472 2006/09/14 09:07:24 masneyb Exp $ tags
+	* *.[ch] - added $Id: ChangeLog,v 1.473 2006/09/15 11:26:01 masneyb Exp $ tags
 
 	* debian/* - updated files from Debian maintainer
 
--- a/lib/protocols.c	Fri Sep 15 08:20:46 2006 +0000
+++ b/lib/protocols.c	Fri Sep 15 11:26:05 2006 +0000
@@ -337,6 +337,7 @@
   if (request->abort_transfer == NULL)
     return (GFTP_EFATAL);
 
+  /* FIXME - end the transfer if it is not successful */
   return (request->abort_transfer (request));
 }
 
@@ -2662,6 +2663,8 @@
   fd_set fset;
   ssize_t ret;
 
+  g_return_val_if_fail (fd >= 0, GFTP_EFATAL);
+
   gftp_lookup_request_option (request, "network_timeout", &network_timeout);  
 
   errno = 0;
@@ -2738,6 +2741,8 @@
   fd_set fset;
   int ret;
 
+  g_return_val_if_fail (fd >= 0, GFTP_EFATAL);
+
   gftp_lookup_request_option (request, "network_timeout", &network_timeout);  
 
   errno = 0;
@@ -2829,6 +2834,8 @@
 {
   int flags;
 
+  g_return_val_if_fail (fd >= 0, GFTP_EFATAL);
+
   if ((flags = fcntl (fd, F_GETFL, 0)) < 0)
     {
       request->logging_function (gftp_logging_error, request,