gvfs r1579 - in trunk: . daemon



Author: otte
Date: Thu Mar  6 12:13:25 2008
New Revision: 1579
URL: http://svn.gnome.org/viewvc/gvfs?rev=1579&view=rev

Log:
2008-03-06  Benjamin Otte  <otte gnome org>

	* daemon/gvfsbackendftp.c: (do_mount):
	fail early if there's no ftp server where we connect



Modified:
   trunk/ChangeLog
   trunk/daemon/gvfsbackendftp.c

Modified: trunk/daemon/gvfsbackendftp.c
==============================================================================
--- trunk/daemon/gvfsbackendftp.c	(original)
+++ trunk/daemon/gvfsbackendftp.c	Thu Mar  6 12:13:25 2008
@@ -1200,6 +1200,15 @@
 
   conn = ftp_connection_create (ftp->addr,
 			        G_VFS_JOB (job));
+  /* fail fast here. No need to ask for a password if we know the hostname
+   * doesn't exist or the given host/port doesn't have an ftp server running.
+   */
+  if (ftp_connection_in_error (conn))
+    {
+      ftp_connection_pop_job (conn);
+      ftp_connection_free (conn);
+      return;
+    }
 
   port = soup_address_get_port (ftp->addr);
   /* FIXME: need to translate this? */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]