vlc | branch: master | Thomas Guillem <[email protected]> | Sun Jan 24 12:16:20 2016 +0100| [869567f732b0fda1f2d15478ab070b533e96770d] | committer: Thomas Guillem
keystore: reset credentials when they are not valid > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=869567f732b0fda1f2d15478ab070b533e96770d --- src/misc/keystore.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/misc/keystore.c b/src/misc/keystore.c index 3d338a1..e44e605 100644 --- a/src/misc/keystore.c +++ b/src/misc/keystore.c @@ -156,8 +156,15 @@ find_closest_path(vlc_keystore_entry *p_entries, unsigned i_count, static bool is_credential_valid(vlc_credential *p_credential) { - return p_credential->psz_username && *p_credential->psz_username != '\0' - && p_credential->psz_password; + if (p_credential->psz_username && *p_credential->psz_username != '\0' + && p_credential->psz_password) + return true; + else + { + p_credential->psz_username = p_credential->psz_password = NULL; + return false; + } + } /* Default port for each protocol */ _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
