http://bugzilla.moblin.org/show_bug.cgi?id=3604
--- Comment #14 from yongsheng zhu <yongsheng.zhu(a)intel.com> 2009-09-04 00:25:54
---
I see. The dead code in CmdlineSyncClient::savePassword() confused
me. Better
remove it.
Ok, done.
The "return false" after "throwError" will never
be reached. If it was, what is
the caller of savePassword() to do if it gets a "false" return code? Currently
the caller silently doesn't do anything and the password isn't saved. I doubt
that this is useful. I think savePassword() doesn't need a bool return code and
should either do the job or throw an error.
The reason is that if the callee
doesn't save the password, then the
caller(PasswordConfigProperty) won't reset its password with the value '-'
because I've moved this part of code to PasswordConfigProperty . For example,
if no keyring support and user doesn't need keyring, then savePassword in
CmdlineSyncClient::savePassword will return false.
see the new code.
I haven't really thought much about this. If it can be done
without breaking
the abstraction layers, then it would be a cleaner way to access specific
config properties, like "sync URL". On the other hand, the caller of
askPassword/savePassword might not know what the currently active
EvolutionSyncConfig and SyncSourceConfig is.
Yes, it's the main concern of this
issue. Currently I past the ConfigNode to
these 2 functions because the caller(PasswordConfigProperty) has this kind of
information for the configNode is pasted to it by its own caller.
I think the most confusing thing to me is I don't know what kind of information
will be needed except config.ini in the future. It's hard to figure it out.
I still don't understand; I'll have a look how this works at
runtime in the
next revision of the patch.
we know that 'checkPassword' is invoked by
'sync()' for retrieving password,
however, who will invoke CmdlineSyncClient::savePassword(ConfigUserInterface&)?
The answer has 2 choices: invoke this before flushing to the config files or
users invoke it directly.
--
Configure bugmail:
http://bugzilla.moblin.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching someone on the CC list of the bug.