vlc/vlc-3.0 | branch: master | Thomas Guillem <[email protected]> | Tue Feb 12 
15:25:27 2019 +0100| [bb4f918aaaf83391c8e032c2e471a452205c1660] | 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.

(cherry picked from commit d21a42d7e92cd9243776f3f9bbfd4c5de34df51d)
Signed-off-by: Thomas Guillem <[email protected]>

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

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

diff --git a/src/misc/keystore.c b/src/misc/keystore.c
index 116849e042..b21016c5f5 100644
--- a/src/misc/keystore.c
+++ b/src/misc/keystore.c
@@ -435,9 +435,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);

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to