gvfs r2092 - in trunk: . daemon
- From: otte svn gnome org
- To: svn-commits-list gnome org
- Subject: gvfs r2092 - in trunk: . daemon
- Date: Mon, 17 Nov 2008 11:14:09 +0000 (UTC)
Author: otte
Date: Mon Nov 17 11:14:08 2008
New Revision: 2092
URL: http://svn.gnome.org/viewvc/gvfs?rev=2092&view=rev
Log:
* daemon/gvfsbackendftp.c: (ftp_connection_prepare),
(ftp_connection_use), (g_vfs_backend_ftp_pop_connection),
(do_mount):
Do FEAT and OPTS UTF8 ON before login. This mirros behavior of lftp.
Modified:
trunk/ChangeLog
trunk/daemon/gvfsbackendftp.c
Modified: trunk/daemon/gvfsbackendftp.c
==============================================================================
--- trunk/daemon/gvfsbackendftp.c (original)
+++ trunk/daemon/gvfsbackendftp.c Mon Nov 17 11:14:08 2008
@@ -749,21 +749,26 @@
}
static gboolean
-ftp_connection_use (FtpConnection *conn)
+ftp_connection_prepare (FtpConnection *conn)
{
- /* only binary transfers please */
- ftp_connection_send (conn, 0, "TYPE I");
- if (ftp_connection_in_error (conn))
- return FALSE;
-
/* check supported features */
if (ftp_connection_send (conn, 0, "FEAT") != 0)
ftp_connection_parse_features (conn);
else
conn->features = FTP_FEATURES_DEFAULT;
+ /* instruct server that we'll give and assume we get utf8 */
if (conn->features & FTP_FEATURE_UTF8)
ftp_connection_send (conn, 0, "OPTS UTF8 ON");
+}
+
+static gboolean
+ftp_connection_use (FtpConnection *conn)
+{
+ /* only binary transfers please */
+ ftp_connection_send (conn, 0, "TYPE I");
+ if (ftp_connection_in_error (conn))
+ return FALSE;
#if 0
/* RFC 2428 suggests to send this to make NAT routers happy */
@@ -1283,6 +1288,7 @@
ftp->connections++;
g_mutex_unlock (ftp->mutex);
conn = ftp_connection_create (ftp->addr, job);
+ ftp_connection_prepare (conn);
ftp_connection_login (conn, ftp->user, ftp->password);
ftp_connection_use (conn);
if (!ftp_connection_in_error (conn))
@@ -1397,6 +1403,8 @@
return;
}
+ ftp_connection_prepare (conn);
+
port = soup_address_get_port (ftp->addr);
/* FIXME: need to translate this? */
if (port == 21)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]