aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2004-05-21 17:08:09 +0800
committerMichael Zucci <zucchi@src.gnome.org>2004-05-21 17:08:09 +0800
commit2bc97c08c1ca8057f03b3b3d872eafa306bab22c (patch)
treeb290bc21cafc1b26ac44a5296a58748c0cad439c
parentcfa1f110a7dabe96457a17f0e42f632f8b111828 (diff)
downloadgsoc2013-evolution-2bc97c08c1ca8057f03b3b3d872eafa306bab22c.tar.gz
gsoc2013-evolution-2bc97c08c1ca8057f03b3b3d872eafa306bab22c.tar.zst
gsoc2013-evolution-2bc97c08c1ca8057f03b3b3d872eafa306bab22c.zip
added a 'domain' argument, and rearragned arguments to be prettier and
2004-05-21 Not Zed <NotZed@Ximian.com> * camel-session.c (camel_session_get_password): added a 'domain' argument, and rearragned arguments to be prettier and more consistent. Fixed all callers. (camel_session_forget_password): added a domain argument. Fixed all callers. ** See #58376. * camel-folder.c (set_message_flags): if system flags change, then don't trigger a folder changed event. * camel-folder-summary.h (CAMEL_MESSAGE_SYSTEM_MASK): added this to indicate which flags are internal/apps not interested in. * camel-folder.c (filter_free): rearrange and use some helpers. (folder_changed): if we're frozen, dont go firing off threads to do any processing on each change, wait until we're called unfrozen. Slight code rearragnement. (filter_filter): add progress to junk learn/unlearn, and separate them. svn path=/trunk/; revision=26029
-rw-r--r--camel/ChangeLog23
-rw-r--r--camel/camel-folder-summary.h2
-rw-r--r--camel/camel-folder.c146
-rw-r--r--camel/camel-gpg-context.c4
-rw-r--r--camel/camel-sasl-popb4smtp.c2
-rw-r--r--camel/camel-session.c15
-rw-r--r--camel/camel-session.h12
-rw-r--r--camel/camel-smime-context.c6
-rw-r--r--camel/providers/imap/camel-imap-store.c6
-rw-r--r--camel/providers/imap4/camel-imap4-store.c2
-rw-r--r--camel/providers/imapp/camel-imapp-store.c6
-rw-r--r--camel/providers/nntp/camel-nntp-store.c4
-rw-r--r--camel/providers/pop3/camel-pop3-store.c4
-rw-r--r--camel/providers/smtp/camel-smtp-transport.c6
14 files changed, 129 insertions, 109 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 3e94889487..f2931383e2 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,26 @@
+2004-05-21 Not Zed <NotZed@Ximian.com>
+
+ * camel-session.c (camel_session_get_password): added a 'domain'
+ argument, and rearragned arguments to be prettier and more
+ consistent. Fixed all callers.
+ (camel_session_forget_password): added a domain argument. Fixed
+ all callers.
+
+ ** See #58376.
+
+ * camel-folder.c (set_message_flags): if system flags change, then
+ don't trigger a folder changed event.
+
+ * camel-folder-summary.h (CAMEL_MESSAGE_SYSTEM_MASK): added this
+ to indicate which flags are internal/apps not interested in.
+
+ * camel-folder.c (filter_free): rearrange and use some helpers.
+ (folder_changed): if we're frozen, dont go firing off threads to
+ do any processing on each change, wait until we're called
+ unfrozen. Slight code rearragnement.
+ (filter_filter): add progress to junk learn/unlearn, and separate
+ them.
+
2004-05-19 Suresh Chandrasekharan <suresh.chandrasekharan@sun.com>
Fix for #58738 ja_JP.UTF-8: Evolution crashes when certain
diff --git a/camel/camel-folder-summary.h b/camel/camel-folder-summary.h
index cf0100b5af..bc9b9b6017 100644
--- a/camel/camel-folder-summary.h
+++ b/camel/camel-folder-summary.h
@@ -81,6 +81,8 @@ enum _CamelMessageFlags {
to learn that message as junk/non junk */
CAMEL_MESSAGE_USER = 1<<31 /* supports user flags */
};
+/* Changes to system flags will NOT trigger a folder changed event */
+#define CAMEL_MESSAGE_SYSTEM_MASK (0xffff << 16)
typedef struct _CamelFlag {
struct _CamelFlag *next;
diff --git a/camel/camel-folder.c b/camel/camel-folder.c
index feeaab6d09..cb9cd7dda2 100644
--- a/camel/camel-folder.c
+++ b/camel/camel-folder.c
@@ -753,7 +753,7 @@ set_message_flags(CamelFolder *folder, const char *uid, guint32 flags, guint32 s
{
CamelMessageInfo *info;
CamelFolderChangeInfo *changes;
- guint32 new;
+ guint32 old;
g_return_val_if_fail(folder->summary != NULL, FALSE);
@@ -761,16 +761,19 @@ set_message_flags(CamelFolder *folder, const char *uid, guint32 flags, guint32 s
if (info == NULL)
return FALSE;
- new = (info->flags & ~flags) | (set & flags);
- if (new == info->flags) {
- camel_folder_summary_info_free(folder->summary, info);
- return FALSE;
+ old = info->flags;
+ info->flags = (old & ~flags) | (set & flags);
+ if (old != info->flags) {
+ info->flags |= CAMEL_MESSAGE_FOLDER_FLAGGED;
+ camel_folder_summary_touch(folder->summary);
}
-
- info->flags = new | CAMEL_MESSAGE_FOLDER_FLAGGED;
- camel_folder_summary_touch(folder->summary);
+
camel_folder_summary_info_free(folder->summary, info);
+ /* app or vfolders don't need to be notified of system flag changes */
+ if ((old & ~CAMEL_MESSAGE_SYSTEM_MASK) == (info->flags & ~CAMEL_MESSAGE_SYSTEM_MASK))
+ return FALSE;
+
changes = camel_folder_change_info_new();
camel_folder_change_info_change_uid(changes, uid);
camel_object_trigger_event(folder, "folder_changed", changes);
@@ -1656,38 +1659,44 @@ filter_filter(CamelSession *session, CamelSessionThreadMsg *msg)
CamelURL *uri;
char *source_url;
CamelException ex;
+ CamelJunkPlugin *csp = ((CamelService *)m->folder->parent_store)->session->junk_plugin;
- if (m->junk || m->notjunk) {
- CamelJunkPlugin *csp = ((CamelService *)m->folder->parent_store)->session->junk_plugin;
-
- camel_operation_start (NULL, _("Learning junk and/or non junk message(s)"));
+ if (m->junk) {
+ camel_operation_start (NULL, _("Learning junk"));
- if (m->junk) {
- for (i = 0; i < m->junk->len; i ++) {
- CamelMimeMessage *msg = camel_folder_get_message(m->folder, m->junk->pdata[i], NULL);
+ for (i = 0; i < m->junk->len; i ++) {
+ CamelMimeMessage *msg = camel_folder_get_message(m->folder, m->junk->pdata[i], NULL);
+ int pc = 100 * i / m->junk->len;
+
+ camel_operation_progress(NULL, pc);
- if (msg) {
- camel_junk_plugin_report_junk (csp, msg);
- camel_object_unref (msg);
- }
+ if (msg) {
+ camel_junk_plugin_report_junk (csp, msg);
+ camel_object_unref (msg);
}
}
- if (m->notjunk) {
- for (i = 0; i < m->notjunk->len; i ++) {
- CamelMimeMessage *msg = camel_folder_get_message(m->folder, m->notjunk->pdata[i], NULL);
+ camel_operation_end (NULL);
+ }
- if (msg) {
- camel_junk_plugin_report_notjunk (csp, msg);
- camel_object_unref (msg);
- }
- }
- }
+ if (m->notjunk) {
+ camel_operation_start (NULL, _("Learning non-junk"));
+ for (i = 0; i < m->notjunk->len; i ++) {
+ CamelMimeMessage *msg = camel_folder_get_message(m->folder, m->notjunk->pdata[i], NULL);
+ int pc = 100 * i / m->notjunk->len;
- camel_junk_plugin_commit_reports (csp);
+ camel_operation_progress(NULL, pc);
+ if (msg) {
+ camel_junk_plugin_report_notjunk (csp, msg);
+ camel_object_unref (msg);
+ }
+ }
camel_operation_end (NULL);
}
+ if (m->junk || m->notjunk)
+ camel_junk_plugin_commit_reports (csp);
+
if (m->driver && m->recents) {
camel_operation_start(NULL, _("Filtering new message(s)"));
@@ -1736,27 +1745,18 @@ static void
filter_free(CamelSession *session, CamelSessionThreadMsg *msg)
{
struct _folder_filter_msg *m = (struct _folder_filter_msg *)msg;
- int i;
- camel_folder_thaw(m->folder);
- camel_object_unref((CamelObject *)m->folder);
if (m->driver)
- camel_object_unref((CamelObject *)m->driver);
- if (m->recents) {
- for (i=0;i<m->recents->len;i++)
- g_free(m->recents->pdata[i]);
- g_ptr_array_free(m->recents, TRUE);
- }
- if (m->junk) {
- for (i=0;i<m->junk->len;i++)
- g_free(m->junk->pdata[i]);
- g_ptr_array_free(m->junk, TRUE);
- }
- if (m->notjunk) {
- for (i=0;i<m->notjunk->len;i++)
- g_free(m->notjunk->pdata[i]);
- g_ptr_array_free(m->notjunk, TRUE);
- }
+ camel_object_unref(m->driver);
+ if (m->recents)
+ camel_folder_free_deep(m->folder, m->recents);
+ if (m->junk)
+ camel_folder_free_deep(m->folder, m->junk);
+ if (m->notjunk)
+ camel_folder_free_deep(m->folder, m->notjunk);
+
+ camel_folder_thaw(m->folder);
+ camel_object_unref(m->folder);
}
static CamelSessionThreadOps filter_ops = {
@@ -1768,28 +1768,36 @@ static CamelSessionThreadOps filter_ops = {
static gboolean
folder_changed (CamelObject *obj, gpointer event_data)
{
- CamelFolder *folder = CAMEL_FOLDER (obj);
+ CamelFolder *folder = (CamelFolder *)obj;
CamelFolderChangeInfo *changed = event_data;
CamelSession *session = ((CamelService *)folder->parent_store)->session;
CamelFilterDriver *driver = NULL;
GPtrArray *junk = NULL;
GPtrArray *notjunk = NULL;
GPtrArray *recents = NULL;
- gboolean ret = TRUE;
+ int i;
- (printf ("folder_changed(%p, %p), frozen=%d\n", obj, event_data, folder->priv->frozen));
- (printf(" added %d remoded %d changed %d recent %d\n",
+ d(printf ("folder_changed(%p:'%s', %p), frozen=%d\n", obj, folder->full_name, event_data, folder->priv->frozen));
+ d(printf(" added %d removed %d changed %d recent %d\n",
changed->uid_added->len, changed->uid_removed->len,
changed->uid_changed->len, changed->uid_recent->len));
if (changed == NULL) {
w(g_warning ("Class %s is passing NULL to folder_changed event",
camel_type_to_name (CAMEL_OBJECT_GET_TYPE (folder))));
- return ret;
+ return TRUE;
+ }
+
+ CAMEL_FOLDER_LOCK(folder, change_lock);
+ if (folder->priv->frozen) {
+ camel_folder_change_info_cat(folder->priv->changed_frozen, changed);
+ CAMEL_FOLDER_UNLOCK(folder, change_lock);
+
+ return FALSE;
}
+ CAMEL_FOLDER_UNLOCK(folder, change_lock);
if (changed->uid_changed->len) {
- int i;
guint32 flags;
for (i = 0; i < changed->uid_changed->len; i ++) {
@@ -1808,9 +1816,6 @@ folder_changed (CamelObject *obj, gpointer event_data)
camel_folder_set_message_flags (folder, changed->uid_changed->pdata [i], CAMEL_MESSAGE_JUNK_LEARN, 0);
}
}
- ((junk || notjunk)
- && printf("** Have '%d' messages for junk filter to learn, launching thread to process them\n",
- (junk ? junk->len : 0) + (notjunk ? notjunk->len : 0)));
}
if ((folder->folder_flags & (CAMEL_FOLDER_FILTER_RECENT|CAMEL_FOLDER_FILTER_JUNK))
@@ -1819,46 +1824,31 @@ folder_changed (CamelObject *obj, gpointer event_data)
(folder->folder_flags & CAMEL_FOLDER_FILTER_RECENT)
? FILTER_SOURCE_INCOMING : FILTER_SOURCE_JUNKTEST, NULL);
- CAMEL_FOLDER_LOCK(folder, change_lock);
-
if (driver) {
- int i;
recents = g_ptr_array_new();
-
for (i=0;i<changed->uid_recent->len;i++)
g_ptr_array_add(recents, g_strdup(changed->uid_recent->pdata[i]));
-
- (printf("** Have '%d' recent messages, launching thread to process them\n", changed->uid_recent->len));
}
if (driver || junk || notjunk) {
struct _folder_filter_msg *msg;
- folder->priv->frozen++;
+ d(printf("* launching filter thread %d new mail, %d junk and %d not junk\n",
+ recents?recents->len:0, junk?junk->len:0, notjunk?notjunk->len:0));
+
msg = camel_session_thread_msg_new(session, &filter_ops, sizeof(*msg));
msg->recents = recents;
msg->junk = junk;
msg->notjunk = notjunk;
msg->folder = folder;
- camel_object_ref((CamelObject *)folder);
+ camel_object_ref(folder);
+ camel_folder_freeze(folder);
msg->driver = driver;
camel_exception_init(&msg->ex);
camel_session_thread_queue(session, &msg->msg, 0);
-
- /* zero out the recent list so we dont reprocess */
- /* this pokes past abstraction, but changeinfo is our structure anyway */
- /* the only other alternative is to recognise when trigger is called from
- thaw(), but thats a pita */
- g_ptr_array_set_size(changed->uid_recent, 0);
}
-
- if (folder->priv->frozen) {
- camel_folder_change_info_cat(folder->priv->changed_frozen, changed);
- ret = FALSE;
- }
- CAMEL_FOLDER_UNLOCK(folder, change_lock);
- return ret;
+ return TRUE;
}
/**
diff --git a/camel/camel-gpg-context.c b/camel/camel-gpg-context.c
index 5e3632cbe1..b69feb9277 100644
--- a/camel/camel-gpg-context.c
+++ b/camel/camel-gpg-context.c
@@ -772,7 +772,7 @@ gpg_ctx_parse_status (struct _GpgCtx *gpg, CamelException *ex)
prompt = g_strdup_printf (_("You need a passphrase to unlock the key for\n"
"user: \"%s\""), name);
- if ((passwd = camel_session_get_password (gpg->session, prompt, CAMEL_SESSION_PASSWORD_SECRET, NULL, gpg->need_id, ex)) && !gpg->utf8) {
+ if ((passwd = camel_session_get_password (gpg->session, NULL, NULL, prompt, gpg->need_id, CAMEL_SESSION_PASSWORD_SECRET, ex)) && !gpg->utf8) {
char *opasswd = passwd;
if ((passwd = g_locale_to_utf8 (passwd, -1, &nread, &nwritten, NULL))) {
@@ -800,7 +800,7 @@ gpg_ctx_parse_status (struct _GpgCtx *gpg, CamelException *ex)
} else if (!strncmp (status, "BAD_PASSPHRASE", 14)) {
gpg->bad_passwds++;
- camel_session_forget_password (gpg->session, NULL, gpg->need_id, ex);
+ camel_session_forget_password (gpg->session, NULL, NULL, gpg->need_id, ex);
if (gpg->bad_passwds == 3) {
camel_exception_set (ex, CAMEL_EXCEPTION_SERVICE_CANT_AUTHENTICATE,
diff --git a/camel/camel-sasl-popb4smtp.c b/camel/camel-sasl-popb4smtp.c
index 338a235d60..fb940b012a 100644
--- a/camel/camel-sasl-popb4smtp.c
+++ b/camel/camel-sasl-popb4smtp.c
@@ -100,7 +100,7 @@ popb4smtp_challenge (CamelSasl *sasl, GByteArray *token, CamelException *ex)
sasl->authenticated = FALSE;
- popuri = camel_session_get_password (session, _("POP Source URI"), 0, sasl->service, "popb4smtp_uri", ex);
+ popuri = camel_session_get_password (session, sasl->service, NULL, _("POP Source URI"), "popb4smtp_uri", 0, ex);
if (popuri == NULL) {
camel_exception_setv(ex, 1, _("POP Before SMTP auth using an unknown transport"));
diff --git a/camel/camel-session.c b/camel/camel-session.c
index 59d6be649c..5a1b8799f1 100644
--- a/camel/camel-session.c
+++ b/camel/camel-session.c
@@ -317,12 +317,13 @@ camel_session_get_storage_path (CamelSession *session, CamelService *service,
/**
* camel_session_get_password:
* @session: session object
+ * @service: the service this query is being made by
+ * @domain: domain of password request. May be null to use the default.
* @prompt: prompt to provide to user
+ * @item: an identifier, unique within this service, for the information
* @flags: CAMEL_SESSION_PASSWORD_REPROMPT, the prompt should force a reprompt
* CAMEL_SESSION_PASSWORD_SECRET, whether the password is secret
* CAMEL_SESSION_PASSWORD_STATIC, the password is remembered externally
- * @service: the service this query is being made by
- * @item: an identifier, unique within this service, for the information
* @ex: a CamelException
*
* This function is used by a CamelService to ask the application and
@@ -347,16 +348,16 @@ camel_session_get_storage_path (CamelSession *session, CamelService *service,
* Return value: the authentication information or %NULL.
**/
char *
-camel_session_get_password (CamelSession *session, const char *prompt,
+camel_session_get_password (CamelSession *session, CamelService *service,
+ const char *domain, const char *prompt, const char *item,
guint32 flags,
- CamelService *service, const char *item,
CamelException *ex)
{
g_return_val_if_fail (CAMEL_IS_SESSION (session), NULL);
g_return_val_if_fail (prompt != NULL, NULL);
g_return_val_if_fail (item != NULL, NULL);
- return CS_CLASS (session)->get_password (session, prompt, flags, service, item, ex);
+ return CS_CLASS (session)->get_password (session, service, domain, prompt, item, flags, ex);
}
@@ -378,12 +379,12 @@ camel_session_get_password (CamelSession *session, const char *prompt,
**/
void
camel_session_forget_password (CamelSession *session, CamelService *service,
- const char *item, CamelException *ex)
+ const char *domain, const char *item, CamelException *ex)
{
g_return_if_fail (CAMEL_IS_SESSION (session));
g_return_if_fail (item != NULL);
- CS_CLASS (session)->forget_password (session, service, item, ex);
+ CS_CLASS (session)->forget_password (session, service, domain, item, ex);
}
diff --git a/camel/camel-session.h b/camel/camel-session.h
index d57603dae9..de4c15f3fb 100644
--- a/camel/camel-session.h
+++ b/camel/camel-session.h
@@ -85,13 +85,15 @@ typedef struct {
CamelException *ex);
char * (*get_password) (CamelSession *session,
- const char *prompt,
- guint32 flags,
CamelService *service,
+ const char *domain,
+ const char *prompt,
const char *item,
+ guint32 flags,
CamelException *ex);
void (*forget_password) (CamelSession *session,
CamelService *service,
+ const char *domain,
const char *item,
CamelException *ex);
gboolean (*alert_user) (CamelSession *session,
@@ -140,13 +142,15 @@ char * camel_session_get_storage_path (CamelSession *session,
CamelException *ex);
char * camel_session_get_password (CamelSession *session,
- const char *prompt,
- guint32 flags,
CamelService *service,
+ const char *domain,
+ const char *prompt,
const char *item,
+ guint32 flags,
CamelException *ex);
void camel_session_forget_password (CamelSession *session,
CamelService *service,
+ const char *domain,
const char *item,
CamelException *ex);
gboolean camel_session_alert_user (CamelSession *session,
diff --git a/camel/camel-smime-context.c b/camel/camel-smime-context.c
index f087ccdb05..0c3f5de889 100644
--- a/camel/camel-smime-context.c
+++ b/camel/camel-smime-context.c
@@ -97,13 +97,13 @@ sm_get_passwd(PK11SlotInfo *info, PRBool retry, void *arg)
/* we got a password, but its asking again, the password we had was wrong */
if (context->priv->password_tries > 0) {
- camel_session_forget_password(((CamelCipherContext *)context)->session, NULL, PK11_GetTokenName(info), NULL);
+ camel_session_forget_password(((CamelCipherContext *)context)->session, NULL, NULL, PK11_GetTokenName(info), NULL);
context->priv->password_tries = 0;
}
prompt = g_strdup_printf(_("Enter security pass-phrase for `%s'"), PK11_GetTokenName(info));
- pass = camel_session_get_password(((CamelCipherContext *)context)->session, prompt,
- CAMEL_SESSION_PASSWORD_SECRET|CAMEL_SESSION_PASSWORD_STATIC, NULL, PK11_GetTokenName(info), ex);
+ pass = camel_session_get_password(((CamelCipherContext *)context)->session, NULL, NULL, prompt,
+ PK11_GetTokenName(info), CAMEL_SESSION_PASSWORD_SECRET|CAMEL_SESSION_PASSWORD_STATIC, ex);
camel_exception_free(ex);
g_free(prompt);
if (pass) {
diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c
index b669398697..9c70245227 100644
--- a/camel/providers/imap/camel-imap-store.c
+++ b/camel/providers/imap/camel-imap-store.c
@@ -1264,7 +1264,7 @@ imap_auth_loop (CamelService *service, CamelException *ex)
while (!authenticated) {
if (errbuf) {
/* We need to un-cache the password before prompting again */
- camel_session_forget_password (session, service, "password", ex);
+ camel_session_forget_password (session, service, NULL, "password", ex);
g_free (service->url->passwd);
service->url->passwd = NULL;
}
@@ -1278,8 +1278,8 @@ imap_auth_loop (CamelService *service, CamelException *ex)
service->url->user,
service->url->host);
service->url->passwd =
- camel_session_get_password (session, prompt, CAMEL_SESSION_PASSWORD_SECRET,
- service, "password", ex);
+ camel_session_get_password (session, service, NULL,
+ prompt, "password", CAMEL_SESSION_PASSWORD_SECRET, ex);
g_free (prompt);
g_free (errbuf);
errbuf = NULL;
diff --git a/camel/providers/imap4/camel-imap4-store.c b/camel/providers/imap4/camel-imap4-store.c
index 75d45830bf..85ae32407a 100644
--- a/camel/providers/imap4/camel-imap4-store.c
+++ b/camel/providers/imap4/camel-imap4-store.c
@@ -420,7 +420,7 @@ imap4_try_authenticate (CamelService *service, gboolean reprompt, const char *er
service->url->user,
service->url->host);
- service->url->passwd = camel_session_get_password (session, prompt, flags, service, "password", ex);
+ service->url->passwd = camel_session_get_password (session, service, NULL, prompt, "password", flags, ex);
g_free (prompt);
diff --git a/camel/providers/imapp/camel-imapp-store.c b/camel/providers/imapp/camel-imapp-store.c
index 2332a09648..6ae79cae2e 100644
--- a/camel/providers/imapp/camel-imapp-store.c
+++ b/camel/providers/imapp/camel-imapp-store.c
@@ -346,8 +346,8 @@ store_get_pass(CamelIMAPPStore *store)
((CamelService *)store)->url->user,
((CamelService *)store)->url->host);
((CamelService *)store)->url->passwd = camel_session_get_password(camel_service_get_session((CamelService *)store),
- prompt, CAMEL_SESSION_PASSWORD_SECRET,
- (CamelService*)store, "password", &ex);
+ (CamelService *)store, NULL,
+ prompt, "password", CAMEL_SESSION_PASSWORD_SECRET, &ex);
g_free (prompt);
if (camel_exception_is_set(&ex))
camel_exception_throw_ex(&ex);
@@ -418,7 +418,7 @@ imap_connect (CamelService *service, CamelException *ex)
switch (e->id) {
case CAMEL_EXCEPTION_SERVICE_CANT_AUTHENTICATE:
store->login_error = g_strdup_printf("%s\n\n", e->desc);
- camel_session_forget_password(service->session, service, "password", ex);
+ camel_session_forget_password(service->session, service, NULL, "password", ex);
camel_url_set_passwd(service->url, NULL);
break;
default:
diff --git a/camel/providers/nntp/camel-nntp-store.c b/camel/providers/nntp/camel-nntp-store.c
index 3b04f95052..d43fc13ca9 100644
--- a/camel/providers/nntp/camel-nntp-store.c
+++ b/camel/providers/nntp/camel-nntp-store.c
@@ -1001,8 +1001,8 @@ camel_nntp_try_authenticate (CamelNNTPStore *store)
camel_exception_init (&ex);
service->url->passwd =
- camel_session_get_password (session, prompt, CAMEL_SESSION_PASSWORD_SECRET,
- service, "password", &ex);
+ camel_session_get_password (session, service, NULL,
+ prompt, "password", CAMEL_SESSION_PASSWORD_SECRET, &ex);
camel_exception_clear (&ex);
g_free (prompt);
diff --git a/camel/providers/pop3/camel-pop3-store.c b/camel/providers/pop3/camel-pop3-store.c
index 5f4defaec1..685bf49f3c 100644
--- a/camel/providers/pop3/camel-pop3-store.c
+++ b/camel/providers/pop3/camel-pop3-store.c
@@ -481,8 +481,8 @@ pop3_try_authenticate (CamelService *service, gboolean reprompt, const char *err
errmsg ? errmsg : "",
service->url->user,
service->url->host);
- service->url->passwd = camel_session_get_password (camel_service_get_session (service),
- prompt, flags, service, "password", ex);
+ service->url->passwd = camel_session_get_password (camel_service_get_session (service), service, NULL,
+ prompt, "password", flags, ex);
g_free (prompt);
if (!service->url->passwd)
return FALSE;
diff --git a/camel/providers/smtp/camel-smtp-transport.c b/camel/providers/smtp/camel-smtp-transport.c
index 7c1cb97ec0..18583e6839 100644
--- a/camel/providers/smtp/camel-smtp-transport.c
+++ b/camel/providers/smtp/camel-smtp-transport.c
@@ -503,7 +503,7 @@ smtp_connect (CamelService *service, CamelException *ex)
while (!authenticated) {
if (errbuf) {
/* We need to un-cache the password before prompting again */
- camel_session_forget_password (session, service, "password", NULL);
+ camel_session_forget_password (session, service, NULL, "password", NULL);
g_free (service->url->passwd);
service->url->passwd = NULL;
}
@@ -515,8 +515,8 @@ smtp_connect (CamelService *service, CamelException *ex)
errbuf ? errbuf : "", service->url->user,
service->url->host);
- service->url->passwd = camel_session_get_password (session, prompt, CAMEL_SESSION_PASSWORD_SECRET,
- service, "password", ex);
+ service->url->passwd = camel_session_get_password (session, service, NULL,
+ prompt, "password", CAMEL_SESSION_PASSWORD_SECRET, ex);
g_free (prompt);
g_free (errbuf);