Commit 869567f7 authored by Thomas Guillem's avatar Thomas Guillem

keystore: reset credentials when they are not valid

parent 1ec4edf0
......@@ -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 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment