|
|
59ad60 |
diff -up evolution-data-server-3.8.5/camel/camel-imapx-store-summary.c.eds-1098036 evolution-data-server-3.8.5/camel/camel-imapx-store-summary.c
|
|
|
59ad60 |
--- evolution-data-server-3.8.5/camel/camel-imapx-store-summary.c.eds-1098036 2013-07-23 13:57:54.000000000 +0200
|
|
|
59ad60 |
+++ evolution-data-server-3.8.5/camel/camel-imapx-store-summary.c 2014-05-19 15:39:42.145061474 +0200
|
|
|
59ad60 |
@@ -355,17 +355,26 @@ camel_imapx_store_summary_namespace_find
|
|
|
59ad60 |
{
|
|
|
59ad60 |
gint len;
|
|
|
59ad60 |
CamelIMAPXStoreNamespace *ns;
|
|
|
59ad60 |
+ CamelIMAPXStoreNamespace *namespaces[] =
|
|
|
59ad60 |
+ {
|
|
|
59ad60 |
+ s->namespaces->personal,
|
|
|
59ad60 |
+ s->namespaces->other,
|
|
|
59ad60 |
+ s->namespaces->shared,
|
|
|
59ad60 |
+ NULL
|
|
|
59ad60 |
+ };
|
|
|
59ad60 |
+ gint ii = 0;
|
|
|
59ad60 |
|
|
|
59ad60 |
- /* NB: this currently only compares against 1 namespace, in future compare against others */
|
|
|
59ad60 |
- /* CHEN TODO */
|
|
|
59ad60 |
- ns = s->namespaces->personal;
|
|
|
59ad60 |
- while (ns) {
|
|
|
59ad60 |
+ for (ii = 0; ii < 3; ii++) {
|
|
|
59ad60 |
+ ns = namespaces[ii];
|
|
|
59ad60 |
+ if (!ns)
|
|
|
59ad60 |
+ continue;
|
|
|
59ad60 |
+
|
|
|
59ad60 |
+ d ("find_path: comparing namespace '%s' to name '%s'\n", ns->path, path);
|
|
|
59ad60 |
len = strlen (ns->path);
|
|
|
59ad60 |
if (len == 0
|
|
|
59ad60 |
|| (strncmp (ns->path, path, len) == 0
|
|
|
59ad60 |
&& (path[len] == '/' || path[len] == 0)))
|
|
|
59ad60 |
break;
|
|
|
59ad60 |
- ns = NULL;
|
|
|
59ad60 |
}
|
|
|
59ad60 |
|
|
|
59ad60 |
/* have a default? */
|
|
|
59ad60 |
@@ -378,11 +387,20 @@ camel_imapx_store_summary_namespace_find
|
|
|
59ad60 |
{
|
|
|
59ad60 |
gint len = 0;
|
|
|
59ad60 |
CamelIMAPXStoreNamespace *ns;
|
|
|
59ad60 |
+ CamelIMAPXStoreNamespace *namespaces[] =
|
|
|
59ad60 |
+ {
|
|
|
59ad60 |
+ s->namespaces->personal,
|
|
|
59ad60 |
+ s->namespaces->other,
|
|
|
59ad60 |
+ s->namespaces->shared,
|
|
|
59ad60 |
+ NULL
|
|
|
59ad60 |
+ };
|
|
|
59ad60 |
+ gint ii = 0;
|
|
|
59ad60 |
+
|
|
|
59ad60 |
+ for (ii = 0; ii < 3; ii++) {
|
|
|
59ad60 |
+ ns = namespaces[ii];
|
|
|
59ad60 |
+ if (!ns)
|
|
|
59ad60 |
+ continue;
|
|
|
59ad60 |
|
|
|
59ad60 |
- /* NB: this currently only compares against 1 namespace, in future compare against others */
|
|
|
59ad60 |
- /* CHEN TODO */
|
|
|
59ad60 |
- ns = s->namespaces->personal;
|
|
|
59ad60 |
- while (ns) {
|
|
|
59ad60 |
if (ns->full_name)
|
|
|
59ad60 |
len = strlen (ns->full_name);
|
|
|
59ad60 |
d ("find_full: comparing namespace '%s' to name '%s'\n", ns->full_name, full);
|
|
|
59ad60 |
@@ -390,7 +408,6 @@ camel_imapx_store_summary_namespace_find
|
|
|
59ad60 |
|| (strncmp (ns->full_name, full, len) == 0
|
|
|
59ad60 |
&& (full[len] == ns->sep || full[len] == 0)))
|
|
|
59ad60 |
break;
|
|
|
59ad60 |
- ns = NULL;
|
|
|
59ad60 |
}
|
|
|
59ad60 |
|
|
|
59ad60 |
/* have a default? */
|