[evolution-data-server] [IMAPx] Add an 'output_stream' argument to imapx_step()
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] [IMAPx] Add an 'output_stream' argument to imapx_step()
- Date: Wed, 5 Aug 2015 08:46:45 +0000 (UTC)
commit e1c884e16e19fa567ed616b66c49a60e61a6cec3
Author: Milan Crha <mcrha redhat com>
Date: Wed Aug 5 10:45:25 2015 +0200
[IMAPx] Add an 'output_stream' argument to imapx_step()
Thus there is used an already known, not tried to get it once again,
which can eventually fail, if the connection is terminated meanwhile.
camel/providers/imapx/camel-imapx-server.c | 15 ++-------------
1 files changed, 2 insertions(+), 13 deletions(-)
---
diff --git a/camel/providers/imapx/camel-imapx-server.c b/camel/providers/imapx/camel-imapx-server.c
index 57b030f..a02dd18 100644
--- a/camel/providers/imapx/camel-imapx-server.c
+++ b/camel/providers/imapx/camel-imapx-server.c
@@ -2290,10 +2290,10 @@ exit:
static gboolean
imapx_step (CamelIMAPXServer *is,
GInputStream *input_stream,
+ GOutputStream *output_stream,
GCancellable *cancellable,
GError **error)
{
- GOutputStream *output_stream;
guint len;
guchar *token;
gint tok;
@@ -2303,15 +2303,6 @@ imapx_step (CamelIMAPXServer *is,
CAMEL_IMAPX_INPUT_STREAM (input_stream),
&token, &len, cancellable, error);
- output_stream = camel_imapx_server_ref_output_stream (is);
- if (!output_stream) {
- g_set_error_literal (error,
- CAMEL_IMAPX_ERROR, 1,
- _("Cannot issue command, no stream available"));
-
- return FALSE;
- }
-
switch (tok) {
case IMAPX_TOK_ERROR:
/* GError is already set. */
@@ -2337,8 +2328,6 @@ imapx_step (CamelIMAPXServer *is,
break;
}
- g_clear_object (&output_stream);
-
return success;
}
@@ -3702,7 +3691,7 @@ camel_imapx_server_process_command_sync (CamelIMAPXServer *is,
}
while (success && !ic->completed)
- success = imapx_step (is, input_stream, cancellable, &local_error);
+ success = imapx_step (is, input_stream, output_stream, cancellable, &local_error);
imapx_server_reset_inactivity_timer (is);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]