changeset 411:c43caf0691c6

2004-2-29 Brian Masney <masneyb@gftp.org> * lib/rfc959.c - in several instances, if an invalid response is received from the server, make sure an error message is logged to the user before they are disconnected from the site
author masneyb
date Sun, 29 Feb 2004 14:35:59 +0000
parents d83be6d5f8b0
children 686eefc3610f
files ChangeLog lib/rfc959.c
diffstat 2 files changed, 24 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Feb 26 14:28:59 2004 +0000
+++ b/ChangeLog	Sun Feb 29 14:35:59 2004 +0000
@@ -1,3 +1,8 @@
+2004-2-29 Brian Masney <masneyb@gftp.org>
+	* lib/rfc959.c - in several instances, if an invalid response is
+	received from the server, make sure an error message is logged to the
+	user before they are disconnected from the site
+
 2004-02-21  Paisa Seeluangsawat  <paisa@users.sf.net>
 
 	* configure.in: Added Thai (th) to ALL_LINGUAS.
@@ -2221,7 +2226,7 @@
 
 	* cvsclean - added this script
 
-	* *.[ch] - added $Id: ChangeLog,v 1.226 2004/02/21 23:23:38 paisa Exp $ tags
+	* *.[ch] - added $Id: ChangeLog,v 1.227 2004/02/29 14:35:58 masneyb Exp $ tags
 
 	* debian/* - updated files from Debian maintainer
 
--- a/lib/rfc959.c	Thu Feb 26 14:28:59 2004 +0000
+++ b/lib/rfc959.c	Sun Feb 29 14:35:59 2004 +0000
@@ -314,8 +314,8 @@
   else if (ret != '2')
     {
       request->logging_function (gftp_logging_error, request,
-				 _("Received invalid response to PWD command: '%s'\n"),
-                                 request->last_ftp_response);
+                                 _("Invalid response '%c' received from server.\n"),
+                                 ret);
       gftp_disconnect (request);
       return (GFTP_ERETRYABLE);
     }
@@ -323,8 +323,8 @@
   if ((pos = strchr (request->last_ftp_response, '"')) == NULL)
     {
       request->logging_function (gftp_logging_error, request,
-				 _("Received invalid response to PWD command: '%s'\n"),
-                                 request->last_ftp_response);
+                                 _("Invalid response '%c' received from server.\n"),
+                                 ret);
       gftp_disconnect (request);
       return (GFTP_EFATAL);
     }
@@ -334,8 +334,8 @@
   if ((pos = strchr (dir, '"')) == NULL)
     {
       request->logging_function (gftp_logging_error, request,
-				 _("Received invalid response to PWD command: '%s'\n"),
-                                 request->last_ftp_response);
+                                 _("Invalid response '%c' received from server.\n"),
+                                 ret);
       gftp_disconnect (request);
       return (GFTP_EFATAL);
     }
@@ -536,6 +536,9 @@
 
   if (resp != '2')
     {
+      request->logging_function (gftp_logging_error, request,
+                                 _("Invalid response '%c' received from server.\n"),
+                                 resp);
       gftp_disconnect (request);
 
       if (resp == '5')
@@ -749,6 +752,9 @@
       g_free (command);
       if (resp != '2')
 	{
+          request->logging_function (gftp_logging_error, request,
+                                     _("Invalid response '%c' received from server.\n"),
+                                     resp);
           gftp_disconnect (request);
 	  return (GFTP_ERETRYABLE);
 	}
@@ -1340,7 +1346,12 @@
   g_free (tempstr);
 
   if (ret != '1')
-    return (GFTP_ERETRYABLE);
+    {
+      request->logging_function (gftp_logging_error, request,
+                                 _("Invalid response '%c' received from server.\n"),
+                                 ret);
+      return (GFTP_ERETRYABLE);
+    }
 
   ret = 0;
   if (!passive_transfer)