On Wed, 2016-04-06 at 13:35 -0700, Naveen Singh wrote:
In this particular case, service state will be left to failure and
hence the connection will not happen. The way it expects to work is
1) Change the passphrase
2) AP disconnects and the next connect attempt fails with error
property set to "invalid-key" and state is set to failure.
3) Application should not clear the error property in this case.
4) User should be notified and right passphrase should be input.
5) On the next connect attempt service->error would be still set
to CONNMAN_SERVICE_ERROR_INVALID_KEY and
then __connman_service_needs_input would be called from
Upstream does not have this __connman_service_needs_input function, but
otherwise this is how it works.
6) User input new passphrase will be supplied and then
would be cleared and connect would happen.
The key here is that application on top of connman should not be
clearing the error property on invalid_key. If you clear that error,
connman would just keep using the old keys.
Changing the favorite flag is not the right thing to do here.