Commit b1c99471 authored by Thomas Guillem's avatar Thomas Guillem

vlc_credential: fix store behavior

parent 39c8ea3d
......@@ -244,8 +244,9 @@ vlc_credential_get(vlc_credential *p_credential, vlc_object_t *p_parent,
/**
* Store the last dialog credential returned by vlc_credential_get()
*
* This function will store the credential only if it comes from the dialog and
* if the vlc_keystore object is valid.
* This function will store the credential in the memory keystore if it's
* valid, or will store in the permanent one if it comes from the dialog and if
* the user asked for it.
*
* @return true if the credential was stored or comes from the keystore, false
* otherwise
......
......@@ -496,6 +496,8 @@ vlc_credential_get(vlc_credential *p_credential, vlc_object_t *p_parent,
bool
vlc_credential_store(vlc_credential *p_credential, vlc_object_t *p_parent)
{
if (!is_credential_valid(p_credential))
return false;
/* Don't need to store again */
if (p_credential->b_from_keystore)
return p_credential->b_from_keystore;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment