changeset 449:3fc895f61665

2004-3-21 Brian Masney <masneyb@gftp.org> * lib/ftps.c (ftps_auth_tls_start) - if the server rejects the PROT C command, disconnect from the server
author masneyb
date Mon, 22 Mar 2004 00:04:56 +0000
parents 0f6d90057399
children 8a44a7a730f0
files ChangeLog lib/ftps.c
diffstat 2 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sun Mar 21 23:58:39 2004 +0000
+++ b/ChangeLog	Mon Mar 22 00:04:56 2004 +0000
@@ -1,4 +1,7 @@
 2004-3-21 Brian Masney <masneyb@gftp.org>
+	* lib/ftps.c (ftps_auth_tls_start) - if the server rejects the
+	PROT C command, disconnect from the server
+
 	* src/gtk/gftp-gtk.c - initialize the read/write color functions before
 	gftp is initialized
 
@@ -2370,7 +2373,7 @@
 
 	* cvsclean - added this script
 
-	* *.[ch] - added $Id: ChangeLog,v 1.251 2004/03/21 23:55:56 masneyb Exp $ tags
+	* *.[ch] - added $Id: ChangeLog,v 1.252 2004/03/22 00:04:55 masneyb Exp $ tags
 
 	* debian/* - updated files from Debian maintainer
 
--- a/lib/ftps.c	Sun Mar 21 23:58:39 2004 +0000
+++ b/lib/ftps.c	Mon Mar 22 00:04:56 2004 +0000
@@ -89,6 +89,11 @@
       ret = rfc959_send_command (request, "PROT C\r\n", 1);
       if (ret < 0)
         return (ret);
+      else if (ret != '2')
+        {
+          gftp_disconnect (request);
+          return (GFTP_ERETRYABLE);
+        }
 
       params->data_conn_read = gftp_fd_read;
       params->data_conn_write = gftp_fd_write;