[pulseaudio-discuss] [PATCH] device-manager: improve logging about non-existing data

Arun Raghavan arun at accosted.net
Tue Jan 26 05:11:21 PST 2016


On 26 January 2016 at 18:27, Tanu Kaskinen <tanuk at iki.fi> wrote:
> Previously a missing key would cause this kind of log output:
>
> D: [pulseaudio] module-device-manager.c: Database contains invalid data for key: sink:auto_null (probably pre-v1.0 data)
> D: [pulseaudio] module-device-manager.c: Attempting to load legacy (pre-v1.0) data for key: sink:auto_null
> D: [pulseaudio] module-device-manager.c: Size does not match.
> D: [pulseaudio] module-device-manager.c: Unable to load legacy (pre-v1.0) data for key: sink:auto_null. Ignoring.
>
> That is now replaced with
>
> D: [pulseaudio] module-device-manager.c: Database contains no data for key: sink:auto_null
> ---
>  src/modules/module-device-manager.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/src/modules/module-device-manager.c b/src/modules/module-device-manager.c
> index f125bdd..1a0a53e 100644
> --- a/src/modules/module-device-manager.c
> +++ b/src/modules/module-device-manager.c
> @@ -292,8 +292,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_fixed(data.data, data.size);
>      e = entry_new();
> --

+1

-- Arun


More information about the pulseaudio-discuss mailing list