gvfs r2095 - in trunk: . daemon
- From: otte svn gnome org
- To: svn-commits-list gnome org
- Subject: gvfs r2095 - in trunk: . daemon
- Date: Mon, 17 Nov 2008 11:36:33 +0000 (UTC)
Author: otte
Date: Mon Nov 17 11:36:33 2008
New Revision: 2095
URL: http://svn.gnome.org/viewvc/gvfs?rev=2095&view=rev
Log:
* daemon/gvfsbackendftp.c: (ftp_connection_prepare),
(ftp_connection_use):
If feat before login fails, try it again after login. (fixes bug
#556786, researched by Oliver Joos) So we're now "better than gftp and
filezilla together". Take that gnome-vfs!
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:36:33 2008
@@ -111,6 +111,7 @@
typedef enum {
FTP_WORKAROUND_BROKEN_EPSV = (1 << 0),
FTP_WORKAROUND_PASV_ADDR = (1 << 1),
+ FTP_WORKAROUND_FEAT_AFTER_LOGIN = (1 << 2),
} FtpWorkarounds;
struct _GVfsBackendFtp
@@ -769,10 +770,13 @@
ftp_connection_prepare (FtpConnection *conn)
{
/* check supported features */
- if (ftp_connection_send (conn, 0, "FEAT") != 0)
+ if (ftp_connection_send (conn, 0, "FEAT") != 0) {
ftp_connection_parse_features (conn);
- else
- conn->features = FTP_FEATURES_DEFAULT;
+ } else {
+ g_clear_error (&conn->error);
+ conn->workarounds |= FTP_WORKAROUND_FEAT_AFTER_LOGIN;
+ conn->features = 0;
+ }
/* instruct server that we'll give and assume we get utf8 */
if (conn->features & FTP_FEATURE_UTF8)
@@ -804,6 +808,15 @@
g_clear_error (&conn->error);
#endif
+ if (conn->workarounds & FTP_WORKAROUND_FEAT_AFTER_LOGIN) {
+ if (ftp_connection_send (conn, 0, "FEAT") != 0) {
+ ftp_connection_parse_features (conn);
+ } else {
+ g_clear_error (&conn->error);
+ conn->features = FTP_FEATURE_EPSV;
+ }
+ }
+
if (ftp_connection_send (conn, 0, "SYST"))
ftp_connection_parse_system (conn);
g_clear_error (&conn->error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]