GNOME Bugzilla – Bug 488156
Minimize use of WITH_GNOME_KEYRING in e-passwords.c
Last modified: 2007-11-01 19:51:31 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 }
Created attachment 97459 [details] [review] Proposed patch Again, this patch requires the patch from bug #487229 be applied first.
Created attachment 97483 [details] [review] Revised patch Small revision moves the e_msgport_reply() calls into the wrapper functions.
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.
Got it. Tested and committed to Subversion trunk (revision 8175).