evolution-data-server r9636 - branches/gnome-2-22/camel/providers/pop3
- From: fejj svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution-data-server r9636 - branches/gnome-2-22/camel/providers/pop3
- Date: Thu, 2 Oct 2008 21:15:35 +0000 (UTC)
Author: fejj
Date: Thu Oct 2 21:15:35 2008
New Revision: 9636
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=9636&view=rev
Log:
2008-10-02 Jeffrey Stedfast <fejj novell com>
* camel-pop3-store.c (pop3_try_authenticate): If we fail to get
the password, don't return FALSE; return -1 instead.
(pop3_connect): If we fail to authenticate, we need to tell the
session to forget the password.
Modified:
branches/gnome-2-22/camel/providers/pop3/ChangeLog
branches/gnome-2-22/camel/providers/pop3/camel-pop3-store.c
branches/gnome-2-22/camel/providers/pop3/camel-pop3-stream.c
Modified: branches/gnome-2-22/camel/providers/pop3/camel-pop3-store.c
==============================================================================
--- branches/gnome-2-22/camel/providers/pop3/camel-pop3-store.c (original)
+++ branches/gnome-2-22/camel/providers/pop3/camel-pop3-store.c Thu Oct 2 21:15:35 2008
@@ -491,7 +491,7 @@
g_free (base_prompt);
g_free (full_prompt);
if (!service->url->passwd)
- return FALSE;
+ return -1;
}
if (!service->url->authmech) {
@@ -564,13 +564,15 @@
"Error sending username: %s"),
CAMEL_SERVICE (store)->url->host,
store->engine->line ? (char *)store->engine->line : _("Unknown error"));
- } else if (pcp->state != CAMEL_POP3_COMMAND_OK)
+ status = -1;
+ } else if (pcp->state != CAMEL_POP3_COMMAND_OK) {
camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_CANT_AUTHENTICATE,
_("Unable to connect to POP server %s.\n"
"Error sending password: %s"),
CAMEL_SERVICE (store)->url->host,
store->engine->line ? (char *)store->engine->line : _("Unknown error"));
-
+ }
+
camel_pop3_engine_command_free (store->engine, pcp);
if (pcu)
@@ -616,6 +618,7 @@
/* we only re-prompt if we failed to authenticate, any other error and we just abort */
if (status == 0 && camel_exception_get_id (ex) == CAMEL_EXCEPTION_SERVICE_CANT_AUTHENTICATE) {
errbuf = g_markup_printf_escaped ("%s\n\n", camel_exception_get_description (ex));
+ camel_session_forget_password (session, service, NULL, "password", NULL);
g_free (service->url->passwd);
service->url->passwd = NULL;
reprompt = TRUE;
Modified: branches/gnome-2-22/camel/providers/pop3/camel-pop3-stream.c
==============================================================================
--- branches/gnome-2-22/camel/providers/pop3/camel-pop3-stream.c (original)
+++ branches/gnome-2-22/camel/providers/pop3/camel-pop3-stream.c Thu Oct 2 21:15:35 2008
@@ -148,7 +148,7 @@
{
CamelPOP3Stream *is = (CamelPOP3Stream *)stream;
- if (strncmp (buffer, "PASS ", 5) != 0)
+ if (TRUE || strncmp (buffer, "PASS ", 5) != 0)
dd(printf("POP3_STREAM_WRITE(%d):\n%.*s\n", (int)n, (int)n, buffer));
else
dd(printf("POP3_STREAM_WRITE(%d):\nPASS xxxxxxxx\n", (int)n));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]