aboutsummaryrefslogtreecommitdiffstats
path: root/Alsa-afb
diff options
context:
space:
mode:
authorfulup <fulup.arfoll@iot.bzh>2017-08-13 16:50:34 +0200
committerfulup <fulup.arfoll@iot.bzh>2017-08-13 17:31:30 +0200
commit9777a02c7540fdec145feb948b4bbf1cd44c3352 (patch)
tree85f64445ef292938839092696c449d1b7c63216e /Alsa-afb
parentb65178642727536972d0c04e53b2310be58beb2e (diff)
Fix AFB_MESSAGE with null arguments
Diffstat (limited to 'Alsa-afb')
-rw-r--r--Alsa-afb/Alsa-ApiHat.c10
1 files changed, 10 insertions, 0 deletions
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 <math.h>
#include <sys/time.h>
#include <sys/types.h>
+#include <sys/prctl.h>
+
#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,
};