From 9777a02c7540fdec145feb948b4bbf1cd44c3352 Mon Sep 17 00:00:00 2001 From: fulup Date: Sun, 13 Aug 2017 16:50:34 +0200 Subject: Fix AFB_MESSAGE with null arguments --- Alsa-afb/Alsa-ApiHat.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Alsa-afb') diff --git a/Alsa-afb/Alsa-ApiHat.c b/Alsa-afb/Alsa-ApiHat.c index 2c3c5c1..1e9f5ad 100644 --- a/Alsa-afb/Alsa-ApiHat.c +++ b/Alsa-afb/Alsa-ApiHat.c @@ -25,9 +25,18 @@ #include #include #include +#include + #include "Alsa-ApiHat.h" +STATIC int AlsaInit(void) { + int rc= prctl(PR_SET_NAME, "afb-audio-agent\0",NULL,NULL,NULL); + if (rc) AFB_ERROR("ERROR: AlsaCore fail to rename process"); + + return rc; +} + /* * array of the verbs exported to afb-daemon */ @@ -56,4 +65,5 @@ static const struct afb_verb_v2 api_verbs[] = { const struct afb_binding_v2 afbBindingV2 = { .api = "alsacore", .verbs = api_verbs, + .init = AlsaInit, }; -- cgit 1.2.3-korg