summaryrefslogtreecommitdiff
path: root/daemon/gvfsftpconnection.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@gnome.org>2009-06-04 21:44:30 +0200
committerBenjamin Otte <otte@gnome.org>2009-06-11 10:05:40 +0200
commitb4e9f6a3241f072f6275a0a50b6909b8d1a6474b (patch)
treeb4ecb488a2da9bef63336e6fe5127dbfd73b3dee /daemon/gvfsftpconnection.c
parent099ec12159453b224957f36bef4271bfd9c326b3 (diff)
downloadgvfs-b4e9f6a3241f072f6275a0a50b6909b8d1a6474b.tar.gz
[FTP] whitespace changes
- replace tabs with 8 spaces - remove spaces at end of line
Diffstat (limited to 'daemon/gvfsftpconnection.c')
-rw-r--r--daemon/gvfsftpconnection.c64
1 files changed, 32 insertions, 32 deletions
diff --git a/daemon/gvfsftpconnection.c b/daemon/gvfsftpconnection.c
index 9756e37f..81822584 100644
--- a/daemon/gvfsftpconnection.c
+++ b/daemon/gvfsftpconnection.c
@@ -1,5 +1,5 @@
/* GIO - GLib Input, Output and Streaming Library
- *
+ *
* Copyright (C) 2009 Benjamin Otte <otte@gnome.org>
*
* This library is free software; you can redistribute it and/or
@@ -34,10 +34,10 @@ struct _GVfsFtpConnection
{
GSocketClient * client; /* socket client used for opening connections */
- GIOStream * commands; /* ftp command stream */
+ GIOStream * commands; /* ftp command stream */
GDataInputStream * commands_in; /* wrapper around in stream to allow line-wise reading */
- GIOStream * data; /* ftp data stream or NULL if not in use */
+ GIOStream * data; /* ftp data stream or NULL if not in use */
int debug_id; /* unique id for debugging purposes */
};
@@ -151,37 +151,37 @@ g_vfs_ftp_connection_receive (GVfsFtpConnection *conn,
g_ptr_array_add (lines, line);
if (reply_state == FIRST_LINE)
- {
- if (line[0] <= '0' || line[0] > '5' ||
- line[1] < '0' || line[1] > '9' ||
- line[2] < '0' || line[2] > '9')
- {
- g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED,
- _("Invalid reply"));
+ {
+ if (line[0] <= '0' || line[0] > '5' ||
+ line[1] < '0' || line[1] > '9' ||
+ line[2] < '0' || line[2] > '9')
+ {
+ g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED,
+ _("Invalid reply"));
goto fail;
- }
- response = 100 * (line[0] - '0') +
- 10 * (line[1] - '0') +
- (line[2] - '0');
- if (line[3] == ' ')
- reply_state = DONE;
- else if (line[3] == '-')
- reply_state = MULTILINE;
- else
- {
- g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED,
- _("Invalid reply"));
+ }
+ response = 100 * (line[0] - '0') +
+ 10 * (line[1] - '0') +
+ (line[2] - '0');
+ if (line[3] == ' ')
+ reply_state = DONE;
+ else if (line[3] == '-')
+ reply_state = MULTILINE;
+ else
+ {
+ g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED,
+ _("Invalid reply"));
goto fail;
- }
- }
+ }
+ }
else
- {
- if (line[0] - '0' == response / 100 &&
+ {
+ if (line[0] - '0' == response / 100 &&
line[1] - '0' == (response / 10) % 10 &&
- line[2] - '0' == response % 10 &&
- line[3] == ' ')
- reply_state = DONE;
- }
+ line[2] - '0' == response % 10 &&
+ line[3] == ' ')
+ reply_state = DONE;
+ }
if (!lines)
g_free (line);
}
@@ -312,8 +312,8 @@ g_vfs_ftp_connection_read_contents (GVfsFtpConnection *conn,
* g_vfs_ftp_connection_is_usable:
* @conn: a connection
*
- * Checks if this connection can still be used to send new commands. For
- * example, if the connection was closed, this is not possible and this
+ * Checks if this connection can still be used to send new commands. For
+ * example, if the connection was closed, this is not possible and this
* function will return %FALSE.
*
* Returns: %TRUE if the connection is still usable