diff options
author | David Henningsson <david.henningsson@canonical.com> | 2014-10-20 16:19:36 +0200 |
---|---|---|
committer | David Henningsson <david.henningsson@canonical.com> | 2014-10-28 10:33:31 +0100 |
commit | cc7c626e69dde909443831398c28c2ee05f8279c (patch) | |
tree | 21158d1ab1acd59ac815ba676acdf14b62eb8da2 /src/modules/module-device-restore.c | |
parent | eaa80baea94b205658e666e5e1962604d5809f09 (diff) | |
download | pulseaudio-cc7c626e69dde909443831398c28c2ee05f8279c.tar.gz |
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>
Diffstat (limited to 'src/modules/module-device-restore.c')
-rw-r--r-- | src/modules/module-device-restore.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/modules/module-device-restore.c b/src/modules/module-device-restore.c index b7f172fc6..cb42207ef 100644 --- a/src/modules/module-device-restore.c +++ b/src/modules/module-device-restore.c @@ -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); |