GNOME Bugzilla – Bug 737773
Duplicate GAL in new accounts
Last modified: 2015-02-24 17:04:57 UTC
When I create a new EWS account, I get *two* instances of 'Global Address List'. The first one is created thus:
+ Trace 234164
This 1412241251.4654.0@dwoodhou-mobl5.ger.corp.intel.com instance of the GAL stays around, but *not* referenced as 'GalUid' in the account. And soon afterwards, another (..4654.1@...) is created. And this one we *do* remember. A simple band-aid might be to fix the refcounting so that the unref on the old GAL happens *inside* the camel_ews_settings_set_gal_uid() function. Currently we do that only in ews_backend_source_changed_cb(). But although that might fix the symptoms, we'd still be creating a new GAL only to throw it away again immediately and create a second...
Gr, bugzilla is being "helpful" again. That's actually two backtraces, with this sentence in between: But then the GalUid setting is immediately cleared because we're still parsing the newly-created source, AFAICT:
Note that this only happens for newly-created accounts. An account which already existed before this bug will already have a corresponding 'generated' ESource in ~/.cache/evolution/sources/, and *that* will be chosen when we end up in collection_backend_claim_resource() for the resource-id in question. And its UID will also, "coincidentally", be what's set in the gal-uid property right after we set it for ourselves. I've tested with 3.10 and it doesn't happen there. But I can't see any obvious difference; perhaps something on the EDS side changed the order of initialisation. This should be fairly easy to reproduce by just 'rm -rf ~/.cache/evolution/sources' and restarting.
The problem was with notify::online, which is called during object's construct, which "broke" the logic. Postponing the callback registration fixed the issue. I also noticed a problem with not dropped unknown old sources, which is fixed now too (it may remove the second GAL for you). I saw the GAl was constantly rewritten each start of the evolution-source-registry, which is not happening with the below fix. Created commit 1b498a7 in ews master (3.13.7+) [1] Created commit 68b89a9 in ews evolution-ews-3-12 (3.12.7+) [1] https://git.gnome.org/browse/evolution-ews/commit/?id=1b498a7
Thinking of it... Created commit db3eb56 in eds master (3.13.7+) [2] Created commit 12b904c in eds evolution-data-server-3-12 (3.12.7+) [2] https://git.gnome.org/browse/evolution-data-server/commit/?id=db3eb56
This seems to be still reproducible with 3.12.10, it seems I didn't cover all cases.
Ehm, no, there will be opened a new bug report instead, for cases when the server advertises more oflfine books, and one even not being named Global Address List.