diff lib/rfc959.c @ 881:c010094bd60b

2007-2-26 Brian Masney <masneyb@gftp.org> * lib/rfc959.c (rfc959_read_response) - log any commands that return a 4xx or 5xx with the gftp_logging_error priority. (closes #411777)
author masneyb
date Mon, 26 Feb 2007 22:53:57 +0000
parents 1fae947d4418
children 1808cebed602
line wrap: on
line diff
--- a/lib/rfc959.c	Sun Feb 25 20:49:57 2007 +0000
+++ b/lib/rfc959.c	Mon Feb 26 22:53:57 2007 +0000
@@ -122,8 +122,13 @@
 	  strncpy (code, tempstr, 3);
 	  code[3] = ' ';
 	}
-      request->logging_function (gftp_logging_recv, request,
-				 "%s\n", tempstr);
+
+      if (*tempstr == '4' || *tempstr == '5')
+        request->logging_function (gftp_logging_error, request,
+  				   "%s\n", tempstr);
+      else
+        request->logging_function (gftp_logging_recv, request,
+  				   "%s\n", tempstr);
     }
   while (strncmp (code, tempstr, 4) != 0);