aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/imap4/camel-imap4-command.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@novell.com>2004-06-05 02:04:07 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2004-06-05 02:04:07 +0800
commitfdb1224ed8e93ce9b91b5eccef09de695d030dbc (patch)
tree8f1e813741d07fe3b8387c7b7256faac42e308f2 /camel/providers/imap4/camel-imap4-command.c
parent73d6de644d69d940ca45a462ec1f1c0d13a6b06a (diff)
downloadgsoc2013-evolution-fdb1224ed8e93ce9b91b5eccef09de695d030dbc.tar
gsoc2013-evolution-fdb1224ed8e93ce9b91b5eccef09de695d030dbc.tar.gz
gsoc2013-evolution-fdb1224ed8e93ce9b91b5eccef09de695d030dbc.tar.bz2
gsoc2013-evolution-fdb1224ed8e93ce9b91b5eccef09de695d030dbc.tar.lz
gsoc2013-evolution-fdb1224ed8e93ce9b91b5eccef09de695d030dbc.tar.xz
gsoc2013-evolution-fdb1224ed8e93ce9b91b5eccef09de695d030dbc.tar.zst
gsoc2013-evolution-fdb1224ed8e93ce9b91b5eccef09de695d030dbc.zip
Always just return 0, don't try to PR_Sync() - fsync on a socket causes an
2004-06-04 Jeffrey Stedfast <fejj@novell.com> * camel-tcp-stream-ssl.c (stream_flush): Always just return 0, don't try to PR_Sync() - fsync on a socket causes an error. * providers/imap4/camel-imap4-command.c (camel_imap4_command_step): Set exceptions when write/flush fail. * providers/imap4/camel-imap4-engine.c (camel_imap4_engine_take_stream): Set an exception in the case where we get an unexpected greeting from the server. * providers/imap4/camel-imap4-store.c (imap4_create_folder): store->dir_sep no longer exists, so query the engine for the directory separator for the parent_folder. (imap4_build_folder_info): CamelFolderInfo no longer has a path component. svn path=/trunk/; revision=26217
Diffstat (limited to 'camel/providers/imap4/camel-imap4-command.c')
-rw-r--r--camel/providers/imap4/camel-imap4-command.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/camel/providers/imap4/camel-imap4-command.c b/camel/providers/imap4/camel-imap4-command.c
index c1ff3a289b..dc3d43c5d4 100644
--- a/camel/providers/imap4/camel-imap4-command.c
+++ b/camel/providers/imap4/camel-imap4-command.c
@@ -494,7 +494,7 @@ camel_imap4_command_step (CamelIMAP4Command *ic)
if (ic->part == ic->parts) {
ic->tag = g_strdup_printf ("%c%.5u", engine->tagprefix, engine->tag++);
camel_stream_printf (engine->ostream, "%s ", ic->tag);
- d(fprintf (stderr, "sending : %s ", ic->tag));
+ d(fprintf (stderr, "sending: %s ", ic->tag));
}
#if d(!)0
@@ -514,7 +514,7 @@ camel_imap4_command_step (CamelIMAP4Command *ic)
eoln++;
if (sending)
- fwrite ("sending : ", 1, 10, stderr);
+ fwrite ("sending: ", 1, 10, stderr);
fwrite (linebuf, 1, eoln - linebuf, stderr);
linebuf = eoln + 1;
@@ -526,11 +526,19 @@ camel_imap4_command_step (CamelIMAP4Command *ic)
linebuf = ic->part->buffer;
len = ic->part->buflen;
- if ((nwritten = camel_stream_write (engine->ostream, linebuf, len)) == -1)
+ if ((nwritten = camel_stream_write (engine->ostream, linebuf, len)) == -1) {
+ camel_exception_setv (&ic->ex, CAMEL_EXCEPTION_SYSTEM,
+ _("Failed sending command to IMAP server %s: %s"),
+ engine->url->host, g_strerror (errno));
goto exception;
+ }
- if (camel_stream_flush (engine->ostream) == -1)
+ if (camel_stream_flush (engine->ostream) == -1) {
+ camel_exception_setv (&ic->ex, CAMEL_EXCEPTION_SYSTEM,
+ _("Failed sending command to IMAP server %s: %s"),
+ engine->url->host, g_strerror (errno));
goto exception;
+ }
/* now we need to read the response(s) from the IMAP4 server */