[vlc-commits] keystore: try memory keystore on the first try

Thomas Guillem git at videolan.org
Tue Feb 12 15:47:51 CET 2019


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Feb 12 15:25:27 2019 +0100| [d21a42d7e92cd9243776f3f9bbfd4c5de34df51d] | committer: Thomas Guillem

keystore: try memory keystore on the first try

This will speed up remote and protected accesses opening when the user already
entered a credential. Indeed, accessess generally call vlc_credential_get()
with NULL dialog title/fmt arguments first in order to get the password saved
from url/vlc-option but without triggering a dialog. Then if it is failing,
they call the same function with valid dialog arguments in order to trigger the
keystore and the dialog.

This commits will trigger the memory keystore from the first try. This will
prevent accesses to always try the default ("Guest") account if the user
already provided a valid credential.

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

 src/misc/keystore.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/misc/keystore.c b/src/misc/keystore.c
index 62d1822b19..53edb35c2c 100644
--- a/src/misc/keystore.c
+++ b/src/misc/keystore.c
@@ -440,9 +440,6 @@ vlc_credential_get(vlc_credential *p_credential, vlc_object_t *p_parent,
 
         case GET_FROM_MEMORY_KEYSTORE:
         {
-            if (!psz_dialog_title || !psz_dialog_fmt)
-                return false;
-
             vlc_keystore *p_keystore = get_memory_keystore(p_parent);
             if (p_keystore != NULL)
                 credential_find_keystore(p_credential, p_keystore);



More information about the vlc-commits mailing list