[gyrus] Remove trailing whitespaces
- From: Claudio Saavedra <csaavedra src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gyrus] Remove trailing whitespaces
- Date: Sat, 23 Jan 2010 23:29:36 +0000 (UTC)
commit a8597b15ad9f2365b650b3efa268dfd2979c90cf
Author: Claudio Saavedra <csaavedra igalia com>
Date: Sat Jan 23 23:32:28 2010 +0200
Remove trailing whitespaces
README | 36 +++++++-------
configure.in | 8 ++--
src/gyrus-connection.c | 130 ++++++++++++++++++++++++------------------------
3 files changed, 87 insertions(+), 87 deletions(-)
---
diff --git a/README b/README
index d7ebefb..27a3356 100644
--- a/README
+++ b/README
@@ -5,18 +5,18 @@ http://www.gnome.org/projects/gyrus
Version: 0.3.8
-Gyrus is a small tool for the administration of mailboxes in
-IMAP/Cyrus servers. The main idea behind it, is to provide mail server
-administrators with a better way to do the daily maintenance than a
+Gyrus is a small tool for the administration of mailboxes in
+IMAP/Cyrus servers. The main idea behind it, is to provide mail server
+administrators with a better way to do the daily maintenance than a
command line or a plain and boring telnet client..
-Gyrus is free software and licensed under the GPL v.2, you are free and
+Gyrus is free software and licensed under the GPL v.2, you are free and
encouraged to copy it and distribute it. See the COPYING file for details.
* Getting Gyrus
Gyrus can be downloaded from its Web page: http://www.gnome.org/projects/gyrus
- . If you want to get the development version, you can check it out from
+ . If you want to get the development version, you can check it out from
the GNOME git repository:
$ git clone git://git.gnome.org/gyrus
@@ -39,7 +39,7 @@ libgnomeprintui-2.2 (>= 2.10.0)
- Connections:
- Currently, gyrus support only plain IMAP connections (normally, these
+ Currently, gyrus support only plain IMAP connections (normally, these
go by port 143). In the future, secure connections will be implemented.
Also, servers using the UNIX hierarchy separator are supported.
@@ -47,26 +47,26 @@ libgnomeprintui-2.2 (>= 2.10.0)
- Mailboxes:
Gyrus allows you to browse through all the mailboxes of the server. For
- a better performance, you can search a desired mailbox with the 'Find'
+ a better performance, you can search a desired mailbox with the 'Find'
dialog.
You can create mailboxes: for new users, or as sub-mailboxes for existing
ones.
-
+
Also, if you have the needed permissions, you can delete mailboxes easily.
- Quota Management:
-
- With Gyrus you can define the Quota of mailboxes (ie. the maximum amount
+
+ With Gyrus you can define the Quota of mailboxes (ie. the maximum amount
of space resources that a user can use in its mailboxes).
- It is possible to create printable reports of mailboxes whose quota is
+ It is possible to create printable reports of mailboxes whose quota is
over a percentage, so administrator can easily monitor mailboxes
with quota exceeded.
-
+
- Access Control List:
- Gyrus lets you administrate the ACL of each mailbox, i.e., to create,
+ Gyrus lets you administrate the ACL of each mailbox, i.e., to create,
delete, remove and modify the entries of Access Control List.
* Contributing:
@@ -74,9 +74,9 @@ libgnomeprintui-2.2 (>= 2.10.0)
For things that need to be worked you can check the TODO file that should
come with any gyrus distribution.
-If you want to send bug reports, patches, improvements, suggestions, please
-use http://bugzilla.gnome.org under the module 'gyrus'. Questions,
-congratulations, flames, please send them to the gyrus mailing list
+If you want to send bug reports, patches, improvements, suggestions, please
+use http://bugzilla.gnome.org under the module 'gyrus'. Questions,
+congratulations, flames, please send them to the gyrus mailing list
<gyrus-list gnome org>. Instructions to subscribe to the list follow.
* Mailing List:
@@ -86,7 +86,7 @@ team, please subscribe to the gyrus mailing list in the following address:
http://mail.gnome.org/mailman/listinfo/gyrus-list
-The mails should be sent to to <gyrus-list gnome org>. Every kind of feedback
+The mails should be sent to to <gyrus-list gnome org>. Every kind of feedback
is welcome.
* Credits:
@@ -115,5 +115,5 @@ is welcome.
- When the inactivity time is reached and the server sends a "BYE LOGOUT"
command and disconnects, Gyrus 'can' hang out.
- - Even when it's not a bug, gyrus still can't handle secure connections.
+ - Even when it's not a bug, gyrus still can't handle secure connections.
Please do not report this as a bug, we are working on it.
diff --git a/configure.in b/configure.in
index 8dead1f..62b0349 100644
--- a/configure.in
+++ b/configure.in
@@ -27,20 +27,20 @@ GNET_REQUIRED=2.0.0
GCONF_REQUIRED=2.0.0
GTK_PRINT_REQUIRED=2.10.0
-PKG_CHECK_MODULES(GYRUS,
+PKG_CHECK_MODULES(GYRUS,
gtk+-2.0 >= $GTK_REQUIRED
- libglade-2.0 >= $LIBGLADE_REQUIRED
+ libglade-2.0 >= $LIBGLADE_REQUIRED
gnet-2.0 >= $GNET_REQUIRED
gconf-2.0 >= $GCONF_REQUIRED
gtk+-unix-print-2.0 >= $GTK_PRINT_REQUIRED)
-AC_ARG_ENABLE(gnutls,
+AC_ARG_ENABLE(gnutls,
AC_HELP_STRING([--enable-gnutls],
[Build with gnutls support (default=no)]),,
enable_gnutls=no)
if test "x$enable_gnutls" = "xyes"; then
AM_PATH_LIBGNUTLS(1.0.0,[AC_DEFINE(HAVE_GNUTLS, 1, [Define to 1 if GnuTLS is available])
- have_gnutls=true],
+ have_gnutls=true],
AC_MSG_ERROR([*** GNUTLS was not found]))
fi
diff --git a/src/gyrus-connection.c b/src/gyrus-connection.c
index 5db9289..73ab08d 100644
--- a/src/gyrus-connection.c
+++ b/src/gyrus-connection.c
@@ -2,9 +2,9 @@
gyrus-connection.c - Abstract connection object with TLS support
GYRUS -- GNOME Cyrus Administrator.
-
+
Copyright (C) 2005 Mario Fuentes <mario gnome cl>
-
+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
@@ -14,7 +14,7 @@
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -59,7 +59,7 @@ struct _GyrusConnectionPrivate {
gboolean eod;
/* Request string */
GString *command;
-
+
/* Object properties */
gchar *host;
gint port;
@@ -93,7 +93,7 @@ static void
gyrus_connection_receive (GyrusConnection *conn)
{
g_return_if_fail (GYRUS_IS_CONNECTION (conn));
-
+
gnet_conn_read (conn->priv->gconn);
}
@@ -111,29 +111,29 @@ gyrus_connection_tls_read (GyrusConnection *conn,
if (conn->priv->handshaking)
{
gssize bytes;
-
+
g_io_channel_read_chars (conn->priv->gconn->iochannel,
buffer, size, &bytes, NULL);
-
+
return bytes;
}
-
+
/* GnuTLS requests the buffer in blocks.
*/
/* EOF */
if (conn->priv->data_length == 0)
return 0;
-
+
g_print ("Decoding data, %d bytes of Encoded data...\n",
conn->priv->data_length);
gsize len = (size > conn->priv->data_length) ? conn->priv->data_length : size;
-
+
/* Error */
if (len == 0)
{
g_print ("LENGTH 0!!!\n");
-
+
return -1;
}
@@ -146,7 +146,7 @@ gyrus_connection_tls_read (GyrusConnection *conn,
if (len < conn->priv->data_length)
{
conn->priv->data_length -= len;
-
+
gchar *tmp_buf = g_memdup (conn->priv->data + len,
conn->priv->data_length);
@@ -160,9 +160,9 @@ gyrus_connection_tls_read (GyrusConnection *conn,
g_free (conn->priv->data);
conn->priv->data = NULL;
}
-
+
g_print ("Decoded %d bytes...\n", len);
-
+
return len;
}
@@ -173,13 +173,13 @@ gyrus_connection_tls_write (GyrusConnection *conn,
const gchar *buffer, gsize size)
{
gchar *buf;
-
+
g_return_val_if_fail (GYRUS_IS_CONNECTION (conn), 0);
if (conn->priv->handshaking)
{
gssize bytes;
-
+
g_io_channel_write_chars (conn->priv->gconn->iochannel,
buffer, size, &bytes, NULL);
@@ -199,7 +199,7 @@ gyrus_connection_tls_write (GyrusConnection *conn,
}
#endif
-/* Writes in conn->priv->ubuffer the data to
+/* Writes in conn->priv->ubuffer the data to
send to the application, without the COMMAND_ID
prefix.
*/
@@ -208,19 +208,19 @@ gyrus_connection_prepare_ubuffer (GyrusConnection *conn)
{
gchar *buf;
GString *line;
-
+
g_return_if_fail (GYRUS_IS_CONNECTION (conn));
g_return_if_fail (conn->priv->buffer != NULL);
buf = conn->priv->buffer->str;
line = g_string_new ("");
-
+
g_string_set_size (conn->priv->ubuffer, 0);
g_print ("pure buffer:\n%s\n", buf);
while (*buf)
{
g_string_append_c (line, *buf);
-
+
if (*buf == '\n')
{
/* End of buffer, check for command id */
@@ -240,14 +240,14 @@ gyrus_connection_prepare_ubuffer (GyrusConnection *conn)
g_free (lf);
}
-
+
g_strfreev (token);
}
g_string_append (conn->priv->ubuffer, line->str);
g_string_assign (line, "");
}
-
+
buf++;
}
@@ -274,7 +274,7 @@ gyrus_connection_conn_cb (GConn *gconn, GConnEvent *event, gpointer data)
case GNET_CONN_ERROR:
{
g_print ("GyrusConnection:: GNET_CONN_ERROR\n");
-
+
break;
}
case GNET_CONN_CONNECT:
@@ -285,12 +285,12 @@ gyrus_connection_conn_cb (GConn *gconn, GConnEvent *event, gpointer data)
gint priority [] = {GNUTLS_KX_RSA, 0};
gnutls_certificate_credentials credentials;
gint error;
-
+
if (conn->priv->session)
gnutls_deinit (*(conn->priv->session));
conn->priv->session = g_malloc0 (sizeof (gnutls_session));
-
+
/* Initialize a GnuTLS session */
gnutls_init (conn->priv->session, GNUTLS_CLIENT);
/* Setup user pointer to pass in callback, like gpointer data */
@@ -328,7 +328,7 @@ gyrus_connection_conn_cb (GConn *gconn, GConnEvent *event, gpointer data)
signals[CONNECT_RESPONSE],
0,
GYRUS_CONN_FAILED);
-
+
return;
}
else
@@ -337,16 +337,16 @@ gyrus_connection_conn_cb (GConn *gconn, GConnEvent *event, gpointer data)
}
}
#endif
-
+
conn->priv->connected = TRUE;
-
+
g_signal_emit (conn,
signals[CONNECT_RESPONSE],
0,
GYRUS_CONN_DONE);
-
+
gyrus_connection_receive (conn);
-
+
break;
}
case GNET_CONN_CLOSE:
@@ -376,16 +376,16 @@ gyrus_connection_conn_cb (GConn *gconn, GConnEvent *event, gpointer data)
/* A dynamic buffer */
gchar *buf = (gchar *) g_malloc0 (MAX_BUFFER_SIZE);
gssize len;
-
+
len = gnutls_record_recv (*(conn->priv->session),
buf, MAX_BUFFER_SIZE);
-
+
if ((len == GNUTLS_E_AGAIN) || (len == GNUTLS_E_INTERRUPTED)) {
/* The gnutls decoder needs more data to finish decoding. */
gyrus_connection_receive (conn);
return;
}
-
+
/* g_free (conn->priv->data); */
if (len < 0)
@@ -394,17 +394,17 @@ gyrus_connection_conn_cb (GConn *gconn, GConnEvent *event, gpointer data)
/* TODO: manage GnuTLS fatal errors */
if (gnutls_error_is_fatal (len) == 1)
{
- g_error ("GnuTLS fatal error: %s\n",
+ g_error ("GnuTLS fatal error: %s\n",
gnutls_strerror (len));
}
-
+
conn->priv->data = NULL;
}
conn->priv->data = g_strndup (buf, len);
-
+
conn->priv->data_length = len;
-
+
g_free (buf);
}
else
@@ -412,17 +412,17 @@ gyrus_connection_conn_cb (GConn *gconn, GConnEvent *event, gpointer data)
{
conn->priv->data = g_strndup (event->buffer, event->length);
}
-
+
if (conn->priv->data != NULL)
{
/* Append new data to the buffer */
g_string_append (conn->priv->buffer, conn->priv->data);
-
+
g_free (conn->priv->data);
conn->priv->data = NULL;
gyrus_connection_prepare_ubuffer (conn);
-
+
g_signal_emit (conn,
signals[DATA_RECEIVED],
0,
@@ -441,7 +441,7 @@ gyrus_connection_conn_cb (GConn *gconn, GConnEvent *event, gpointer data)
break;
}
-
+
case GNET_CONN_WRITE:
{
gyrus_connection_receive (conn);
@@ -451,10 +451,10 @@ gyrus_connection_conn_cb (GConn *gconn, GConnEvent *event, gpointer data)
/*
*/
case GNET_CONN_READABLE:
- {
+ {
break;
}
-
+
case GNET_CONN_WRITABLE:
{
break;
@@ -470,14 +470,14 @@ gyrus_connection_inetaddr_cb (GInetAddr *inetaddr, gpointer data)
g_return_if_fail (GYRUS_IS_CONNECTION (data));
conn = GYRUS_CONNECTION (data);
-
+
if (inetaddr == NULL)
{
g_signal_emit (conn,
signals[CONNECT_RESPONSE],
0,
GYRUS_CONN_FAILED);
-
+
return;
}
@@ -496,10 +496,10 @@ gyrus_connection_class_finalize (GObject *obj)
GyrusConnection *conn;
g_return_if_fail (GYRUS_IS_CONNECTION (obj));
-
+
conn = GYRUS_CONNECTION (obj);
-
+
}
static void
@@ -507,7 +507,7 @@ gyrus_connection_set_property (GObject *object,
guint property_id, const GValue *value, GParamSpec *pspec)
{
GyrusConnectionPrivate *priv = GYRUS_CONNECTION_GET_PRIVATE (object);
-
+
switch (property_id)
{
case PROP_HOST:
@@ -590,7 +590,7 @@ gyrus_connection_class_init (GyrusConnectionClass *klass)
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GType data_received_param_types[2];
GType connect_response_param_types[1];
-
+
gyrus_connection_parent_class = g_type_class_peek_parent (klass);
gobject_class->set_property = gyrus_connection_set_property;
@@ -605,9 +605,9 @@ gyrus_connection_class_init (GyrusConnectionClass *klass)
"Host Name",
"Host of the server",
"127.0.0.1",
- G_PARAM_READWRITE |
+ G_PARAM_READWRITE |
G_PARAM_CONSTRUCT_ONLY));
-
+
g_object_class_install_property (gobject_class,
PROP_PORT,
g_param_spec_int ("port",
@@ -618,7 +618,7 @@ gyrus_connection_class_init (GyrusConnectionClass *klass)
143,
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT_ONLY));
-
+
g_object_class_install_property (gobject_class,
PROP_CONNECTED,
g_param_spec_boolean ("connected",
@@ -626,7 +626,7 @@ gyrus_connection_class_init (GyrusConnectionClass *klass)
"Is connected?",
FALSE,
G_PARAM_READWRITE));
-
+
g_object_class_install_property (gobject_class,
PROP_TLS,
g_param_spec_boolean ("tls",
@@ -635,12 +635,12 @@ gyrus_connection_class_init (GyrusConnectionClass *klass)
FALSE,
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT_ONLY));
-
+
/* Signals */
-
+
data_received_param_types[0] = G_TYPE_STRING;
data_received_param_types[1] = G_TYPE_BOOLEAN;
-
+
signals[DATA_RECEIVED] =
g_signal_newv ("data_received",
G_TYPE_FROM_CLASS (klass),
@@ -650,7 +650,7 @@ gyrus_connection_class_init (GyrusConnectionClass *klass)
/*g_cclosure_marshal_VOID__STRING,*/
G_TYPE_NONE, 2,
data_received_param_types);
-
+
connect_response_param_types[0] = G_TYPE_INT;
signals[CONNECT_RESPONSE] =
@@ -661,7 +661,7 @@ gyrus_connection_class_init (GyrusConnectionClass *klass)
g_cclosure_marshal_VOID__INT,
G_TYPE_NONE, 1,
connect_response_param_types);
-
+
signals[CONNECTION_CLOSE] =
g_signal_newv ("connection_close",
G_TYPE_FROM_CLASS (klass),
@@ -677,7 +677,7 @@ static void
gyrus_connection_init (GyrusConnection *conn)
{
conn->priv = GYRUS_CONNECTION_GET_PRIVATE (conn);
-
+
conn->priv->gconn = NULL;
#ifdef HAVE_GNUTLS
conn->priv->session = NULL;
@@ -702,7 +702,7 @@ gyrus_connection_new (gchar *host, gint port, gboolean use_tls)
"port", port,
"tls", use_tls,
NULL);
-
+
return conn;
}
@@ -715,7 +715,7 @@ gyrus_connection_destroy (GyrusConnection *conn)
void
gyrus_connection_connect (GyrusConnection *conn)
{
-#ifdef HAVE_GNUTLS
+#ifdef HAVE_GNUTLS
static gboolean gnutls_initialized = FALSE;
#endif
g_return_if_fail (GYRUS_IS_CONNECTION (conn));
@@ -723,7 +723,7 @@ gyrus_connection_connect (GyrusConnection *conn)
if (gyrus_connection_get_connected (conn) == TRUE)
return;
-#ifdef HAVE_GNUTLS
+#ifdef HAVE_GNUTLS
if (!gnutls_initialized)
{
gnutls_global_init ();
@@ -751,18 +751,18 @@ void
gyrus_connection_send (GyrusConnection *conn, const gchar *buffer)
{
GString *cmd;
-
+
g_return_if_fail (GYRUS_IS_CONNECTION (conn));
g_return_if_fail (buffer != NULL);
g_return_if_fail (gyrus_connection_get_connected (conn));
/* Clean the buffer for save the answer */
g_string_set_size (conn->priv->buffer, 0);
-
+
/* Prepare the request string */
cmd = conn->priv->command = g_string_new ("");
g_string_printf (cmd, "%s %s\n", COMMAND_ID, buffer);
-
+
g_print ("Sending command <%s> %d bytes\n", cmd->str, cmd->len);
#ifdef HAVE_GNUTLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]