mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-02 09:01:46 -05:00
module-card/device-restore: Do not legacy load an empty entry
There is no use in trying to load data in legacy format, if we already know that there is no data at all. Also clarify in the debug message whether there is invalid data or no data at all. Signed-off-by: David Henningsson <david.henningsson@canonical.com>
This commit is contained in:
parent
eaa80baea9
commit
cc7c626e69
2 changed files with 9 additions and 5 deletions
|
|
@ -269,8 +269,10 @@ static struct entry* entry_read(struct userdata *u, const char *name) {
|
|||
|
||||
pa_zero(data);
|
||||
|
||||
if (!pa_database_get(u->database, &key, &data))
|
||||
goto fail;
|
||||
if (!pa_database_get(u->database, &key, &data)) {
|
||||
pa_log_debug("Database contains no data for key: %s", name);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
t = pa_tagstruct_new(data.data, data.size);
|
||||
e = entry_new();
|
||||
|
|
|
|||
|
|
@ -233,8 +233,10 @@ static struct entry* entry_read(struct userdata *u, const char *name) {
|
|||
|
||||
pa_zero(data);
|
||||
|
||||
if (!pa_database_get(u->database, &key, &data))
|
||||
goto fail;
|
||||
if (!pa_database_get(u->database, &key, &data)) {
|
||||
pa_log_debug("Database contains no data for key: %s", name);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
t = pa_tagstruct_new(data.data, data.size);
|
||||
e = entry_new();
|
||||
|
|
@ -477,7 +479,7 @@ fail:
|
|||
}
|
||||
#endif
|
||||
|
||||
pa_log_debug("Database contains invalid data for key: %s", name);
|
||||
pa_log_debug("Database contains no (or invalid) data for key: %s", name);
|
||||
|
||||
pa_xfree(name);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue