[evolution-ews/gnome-3-36] I#103 - Can't subscribe to a folder of a user whom is not in GAL
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-ews/gnome-3-36] I#103 - Can't subscribe to a folder of a user whom is not in GAL
- Date: Wed, 27 May 2020 16:21:17 +0000 (UTC)
commit efa227efdc0833a30699f1f2661ff9050829079c
Author: Milan Crha <mcrha redhat com>
Date: Wed May 27 18:22:49 2020 +0200
I#103 - Can't subscribe to a folder of a user whom is not in GAL
Closes https://gitlab.gnome.org/GNOME/evolution-ews/-/issues/103
src/configuration/e-ews-subscribe-foreign-folder.c | 62 ++++++++++------------
1 file changed, 28 insertions(+), 34 deletions(-)
---
diff --git a/src/configuration/e-ews-subscribe-foreign-folder.c
b/src/configuration/e-ews-subscribe-foreign-folder.c
index ef04c999..5804769b 100644
--- a/src/configuration/e-ews-subscribe-foreign-folder.c
+++ b/src/configuration/e-ews-subscribe-foreign-folder.c
@@ -308,48 +308,42 @@ check_foreign_folder_thread (GObject *with_object,
}
}
- if (!mailboxes) {
- g_set_error (
- perror, EWS_CONNECTION_ERROR, EWS_CONNECTION_ERROR_MAILRECIPIENTNOTFOUND,
- _("User “%s” was not found on the server"), cffd->email);
- g_object_unref (conn);
- return;
- }
-
- /* is there only one result? */
- if (mailboxes->next == NULL) {
- mailbox = mailboxes->data;
- } else {
- GSList *iter;
+ if (mailboxes) {
+ /* is there only one result? */
+ if (!mailboxes->next) {
+ mailbox = mailboxes->data;
+ } else {
+ GSList *iter;
- for (iter = mailboxes; iter; iter = iter->next) {
- EwsMailbox *mb = iter->data;
+ for (iter = mailboxes; iter; iter = iter->next) {
+ EwsMailbox *mb = iter->data;
- if (!mb)
- continue;
+ if (!mb)
+ continue;
- if (mb->name && g_utf8_collate (mb->name, cffd->email) == 0) {
- mailbox = mb;
- break;
+ if (mb->name && g_utf8_collate (mb->name, cffd->email) == 0) {
+ mailbox = mb;
+ break;
+ }
}
}
- }
- if (mailbox) {
- g_free (cffd->user_displayname);
- cffd->user_displayname = g_strdup (mailbox->name);
- g_free (cffd->email);
- cffd->email = g_strdup (mailbox->email);
- }
+ if (mailbox) {
+ g_free (cffd->user_displayname);
+ cffd->user_displayname = g_strdup (mailbox->name);
+ g_free (cffd->email);
+ cffd->email = g_strdup (mailbox->email);
+ }
- g_slist_free_full (mailboxes, (GDestroyNotify) e_ews_mailbox_free);
+ g_slist_free_full (mailboxes, (GDestroyNotify) e_ews_mailbox_free);
- if (!mailbox) {
- g_set_error (
- perror, EWS_CONNECTION_ERROR, EWS_CONNECTION_ERROR_ITEMNOTFOUND,
- _("User name “%s” is ambiguous, specify it more precisely, please"),
cffd->email);
- g_object_unref (conn);
- return;
+ if (!mailbox) {
+ g_set_error (
+ perror, EWS_CONNECTION_ERROR, EWS_CONNECTION_ERROR_ITEMNOTFOUND,
+ _("User name “%s” is ambiguous, specify it more precisely, please"),
cffd->email);
+ g_object_unref (conn);
+ return;
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]