[vlc-commits] vlc_credential: fix store behavior

Thomas Guillem git at videolan.org
Mon Feb 29 11:56:52 CET 2016


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Mon Feb 29 11:39:12 2016 +0100| [b1c9947162c0cff3fda25227fc9c0774d5371f2b] | committer: Thomas Guillem

vlc_credential: fix store behavior

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b1c9947162c0cff3fda25227fc9c0774d5371f2b
---

 include/vlc_keystore.h |    5 +++--
 src/misc/keystore.c    |    2 ++
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/include/vlc_keystore.h b/include/vlc_keystore.h
index da97326..67765a4 100644
--- a/include/vlc_keystore.h
+++ b/include/vlc_keystore.h
@@ -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
diff --git a/src/misc/keystore.c b/src/misc/keystore.c
index 4d4af1d..977f30b 100644
--- a/src/misc/keystore.c
+++ b/src/misc/keystore.c
@@ -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;



More information about the vlc-commits mailing list