aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/pop3
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-11-11 14:40:28 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-11-11 14:40:28 +0800
commite1ef0a9ced256cb86d19b379c3097efdbcdb498e (patch)
treea4dcceeaecae46ce8b14fe631fca952ba29d97aa /camel/providers/pop3
parent3eabd14ace6523781473486b533b8e4ac355fc14 (diff)
downloadgsoc2013-evolution-e1ef0a9ced256cb86d19b379c3097efdbcdb498e.tar.gz
gsoc2013-evolution-e1ef0a9ced256cb86d19b379c3097efdbcdb498e.tar.zst
gsoc2013-evolution-e1ef0a9ced256cb86d19b379c3097efdbcdb498e.zip
Use g_strerror when setting an exception string (we need it to be in
2002-11-11 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-folder.c (get_message_simple): Use g_strerror when setting an exception string (we need it to be in UTF-8). * providers/pop3/camel-pop3-store.c (pop3_try_authenticate): Use g_strerror when setting an exception string (we need it to be in UTF-8). * providers/pop3/camel-pop3-folder.c (pop3_refresh_info): Use g_strerror when setting an exception string (we need it to be in UTF-8). (pop3_get_message): Same. svn path=/trunk/; revision=18690
Diffstat (limited to 'camel/providers/pop3')
-rw-r--r--camel/providers/pop3/camel-pop3-folder.c19
-rw-r--r--camel/providers/pop3/camel-pop3-store.c5
-rw-r--r--camel/providers/pop3/camel-pop3-stream.c2
3 files changed, 17 insertions, 9 deletions
diff --git a/camel/providers/pop3/camel-pop3-folder.c b/camel/providers/pop3/camel-pop3-folder.c
index ca93bc9fc5..1aef811e23 100644
--- a/camel/providers/pop3/camel-pop3-folder.c
+++ b/camel/providers/pop3/camel-pop3-folder.c
@@ -261,7 +261,9 @@ pop3_refresh_info (CamelFolder *folder, CamelException *ex)
if (errno == EINTR)
camel_exception_setv(ex, CAMEL_EXCEPTION_USER_CANCEL, _("User cancelled"));
else
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM, _("Cannot get POP summary: %s"), strerror(errno));
+ camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
+ _("Cannot get POP summary: %s"),
+ g_strerror (errno));
}
/* TODO: check every id has a uid & commands returned OK too? */
@@ -426,7 +428,9 @@ pop3_get_message (CamelFolder *folder, const char *uid, CamelException *ex)
if (fi->err == EINTR)
camel_exception_setv(ex, CAMEL_EXCEPTION_USER_CANCEL, _("User cancelled"));
else
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM, _("Cannot get message %s: %s"), uid, strerror(fi->err));
+ camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
+ _("Cannot get message %s: %s"),
+ uid, g_strerror (fi->err));
goto fail;
}
}
@@ -485,12 +489,13 @@ pop3_get_message (CamelFolder *folder, const char *uid, CamelException *ex)
if (fi->err == EINTR)
camel_exception_setv(ex, CAMEL_EXCEPTION_USER_CANCEL, _("User cancelled"));
else
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM, _("Cannot get message %s: %s"), uid, strerror(fi->err));
+ camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
+ _("Cannot get message %s: %s"),
+ uid, g_strerror (fi->err));
goto done;
}
- if (camel_stream_read(stream, buffer, 1) != 1
- || buffer[0] != '#') {
+ if (camel_stream_read(stream, buffer, 1) != 1 || buffer[0] != '#') {
camel_exception_setv(ex, CAMEL_EXCEPTION_FOLDER_INVALID_UID,
_("Cannot get message %s: %s"), uid, _("Unknown reason"));
goto done;
@@ -502,7 +507,9 @@ pop3_get_message (CamelFolder *folder, const char *uid, CamelException *ex)
if (errno == EINTR)
camel_exception_setv(ex, CAMEL_EXCEPTION_USER_CANCEL, _("User cancelled"));
else
- camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM, _("Cannot get message %s: %s"), uid, strerror(errno));
+ camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
+ _("Cannot get message %s: %s"),
+ uid, g_strerror (errno));
camel_object_unref((CamelObject *)message);
message = NULL;
}
diff --git a/camel/providers/pop3/camel-pop3-store.c b/camel/providers/pop3/camel-pop3-store.c
index 20c5640779..6452cb6a47 100644
--- a/camel/providers/pop3/camel-pop3-store.c
+++ b/camel/providers/pop3/camel-pop3-store.c
@@ -513,9 +513,10 @@ pop3_try_authenticate (CamelService *service, const char *errmsg,
camel_exception_set (ex, CAMEL_EXCEPTION_USER_CANCEL, _("Cancelled"));
} else {
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Unable to connect to POP server %s.\nError sending password: %s"),
+ _("Unable to connect to POP server %s.\n"
+ "Error sending password: %s"),
CAMEL_SERVICE (store)->url->host,
- errno ? strerror (errno) : _("Unknown error"));
+ errno ? g_strerror (errno) : _("Unknown error"));
}
} else if (pcp->state != CAMEL_POP3_COMMAND_OK)
camel_exception_setv(ex, CAMEL_EXCEPTION_SERVICE_CANT_AUTHENTICATE,
diff --git a/camel/providers/pop3/camel-pop3-stream.c b/camel/providers/pop3/camel-pop3-stream.c
index 5b0dd979ca..23b9b1e040 100644
--- a/camel/providers/pop3/camel-pop3-stream.c
+++ b/camel/providers/pop3/camel-pop3-stream.c
@@ -64,7 +64,7 @@ stream_fill(CamelPOP3Stream *is)
is->end[0] = '\n';
return is->end - is->ptr;
} else {
- dd(printf("POP3_STREAM_FILL(ERROR): '%s'\n", strerror(errno)));
+ dd(printf("POP3_STREAM_FILL(ERROR): '%s'\n", strerror (errno)));
return -1;
}
}