[vlc-commits] keystore: use dialog_vaLogin (fixes #16404)

Thomas Guillem git at videolan.org
Mon Jan 18 16:11:58 CET 2016


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Mon Jan 18 15:58:41 2016 +0100| [f94215546d90fe084e7852400525a595422446cd] | committer: Thomas Guillem

keystore: use dialog_vaLogin (fixes #16404)

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

 src/misc/keystore.c |   17 +++++------------
 1 file changed, 5 insertions(+), 12 deletions(-)

diff --git a/src/misc/keystore.c b/src/misc/keystore.c
index fb85619..72bd356 100644
--- a/src/misc/keystore.c
+++ b/src/misc/keystore.c
@@ -391,20 +391,13 @@ vlc_credential_get(vlc_credential *p_credential, vlc_object_t *p_parent,
 
             /* TODO: save previously saved username and print it in dialog */
             va_list ap;
-            char *psz_dialog_text;
             va_start(ap, psz_dialog_fmt);
-            if (vasprintf(&psz_dialog_text, psz_dialog_fmt, ap) == -1)
-            {
-                va_end(ap);
-                return false;
-            }
+            dialog_vaLogin(p_parent, p_credential->psz_username,
+                           &p_credential->psz_dialog_username,
+                           &p_credential->psz_dialog_password,
+                           p_credential->p_keystore ? &p_credential->b_store : NULL,
+                           psz_dialog_title, psz_dialog_fmt, ap);
             va_end(ap);
-            dialog_Login(p_parent, p_credential->psz_username,
-                         &p_credential->psz_dialog_username,
-                         &p_credential->psz_dialog_password,
-                         p_credential->p_keystore ? &p_credential->b_store : NULL,
-                         psz_dialog_title, psz_dialog_text, NULL);
-            free(psz_dialog_text);
             if (p_credential->psz_dialog_username
              && p_credential->psz_dialog_password)
             {



More information about the vlc-commits mailing list