After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 488156 - Minimize use of WITH_GNOME_KEYRING in e-passwords.c
Minimize use of WITH_GNOME_KEYRING in e-passwords.c
Status: RESOLVED FIXED
Product: evolution-data-server
Classification: Platform
Component: general
1.12.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: Evolution Shell Maintainers Team
Evolution QA team
Depends on: 487229
Blocks:
 
 
Reported: 2007-10-19 04:55 UTC by Matthew Barnes
Modified: 2007-11-01 19:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch (7.16 KB, patch)
2007-10-19 04:56 UTC, Matthew Barnes
none Details | Review
Revised patch (8.95 KB, patch)
2007-10-19 17:45 UTC, Matthew Barnes
committed Details | Review

Description Matthew Barnes 2007-10-19 04:55:38 UTC
This bug is a piece of bug #376991.  I'm breaking things up to try and expedite
the simple parts.  The patch here builds on bug #487229, which is another piece of bug #376991.

This patch cleans up WITH_GNOME_KEYRING usage in e-passwords.c by reducing it to a set of wrapper functions that call either the "keyring" or "keyfile" variant of an operation.

For example, given the functions ep_get_password_keyring() and ep_get_password_keyfile(), the dispatching function would be:

    static void
    ep_get_password (EPassMsg *msg)
    {
    #ifdef WITH_GNOME_KEYRING
            if (gnome_keyring_is_available ())
                    ep_get_password_keyring ();
            else
                    ep_get_password_keyfile ();
    #else
            ep_get_password_keyfile ();
    #endif
    }
Comment 1 Matthew Barnes 2007-10-19 04:56:53 UTC
Created attachment 97459 [details] [review]
Proposed patch

Again, this patch requires the patch from bug #487229 be applied first.
Comment 2 Matthew Barnes 2007-10-19 17:45:29 UTC
Created attachment 97483 [details] [review]
Revised patch

Small revision moves the e_msgport_reply() calls into the wrapper functions.
Comment 3 Srinivasa Ragavan 2007-11-01 12:30:07 UTC
if (*msg->remember && type == E_PASSWORDS_REMEMBER_FOREVER) 

check is missed out in your patch. Effect: All passwords would be remembered.
It looks clean otherwise. Just rework and test everything and commit. thanks.
Comment 4 Matthew Barnes 2007-11-01 19:51:31 UTC
Got it.  Tested and committed to Subversion trunk (revision 8175).