comparison 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
comparison
equal deleted inserted replaced
880:18850d856cf6 881:c010094bd60b
120 && isdigit ((int) *(tempstr + 2))) 120 && isdigit ((int) *(tempstr + 2)))
121 { 121 {
122 strncpy (code, tempstr, 3); 122 strncpy (code, tempstr, 3);
123 code[3] = ' '; 123 code[3] = ' ';
124 } 124 }
125 request->logging_function (gftp_logging_recv, request, 125
126 "%s\n", tempstr); 126 if (*tempstr == '4' || *tempstr == '5')
127 request->logging_function (gftp_logging_error, request,
128 "%s\n", tempstr);
129 else
130 request->logging_function (gftp_logging_recv, request,
131 "%s\n", tempstr);
127 } 132 }
128 while (strncmp (code, tempstr, 4) != 0); 133 while (strncmp (code, tempstr, 4) != 0);
129 134
130 if (num_read < 0) 135 if (num_read < 0)
131 return ((int) num_read); 136 return ((int) num_read);