diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-04-14 20:23:13 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@gnome-db.org> | 2011-06-30 00:41:54 +0800 |
commit | 51b046cdfdce488b0742a244fa2eede1731fee17 (patch) | |
tree | 04515b72cfd63b4ff081455a76b2995da11aef90 /e-util | |
parent | 2bdd6077740de486821165e007b02f0a380f406e (diff) | |
download | gsoc2013-evolution-51b046cdfdce488b0742a244fa2eede1731fee17.tar gsoc2013-evolution-51b046cdfdce488b0742a244fa2eede1731fee17.tar.gz gsoc2013-evolution-51b046cdfdce488b0742a244fa2eede1731fee17.tar.bz2 gsoc2013-evolution-51b046cdfdce488b0742a244fa2eede1731fee17.tar.lz gsoc2013-evolution-51b046cdfdce488b0742a244fa2eede1731fee17.tar.xz gsoc2013-evolution-51b046cdfdce488b0742a244fa2eede1731fee17.tar.zst gsoc2013-evolution-51b046cdfdce488b0742a244fa2eede1731fee17.zip |
Bug 647698 - Selected calendar doesnt authenticate after offline/online
When I wrote e_load_cal_source_async() it didn't occur to me that a
calendar backend may emit "auth-required" after the initial connection
attempt. And because I was passing the allocated context data for the
asynchronous load operation to e_cal_set_auth_func(), meaning the data
gets freed at the end of the load operation, I was then calling
e_cal_set_auth_func(cal, NULL, NULL) after the initial authentication
was complete so that the ECal would not try to access the freed context
data after the load operation finished.
But that turned out to break the case of switching to offline mode, then
back to online mode. Most calendar backends need to re-authenticate when
they come back online.
This commit instead passes data to the authentication function by way of
g_object_set_data_full() so that the authentication function can be left
in place for the duration of the ECal instance.
Note that e_cal_set_auth_func() lacks a GDestroyNotify argument for the
user data passed to it, which rules out passing any kind of allocated
data structure. This is an API design flaw, in my opinion. But
g_object_set_data_full() *does* take a GDestroyNotify argument.
Diffstat (limited to 'e-util')
0 files changed, 0 insertions, 0 deletions