summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJonathan Aillet <jonathan.aillet@iot.bzh>2019-08-05 16:55:13 +0200
committerJonathan Aillet <jonathan.aillet@iot.bzh>2019-08-12 12:23:11 +0200
commit59da9b4952b9c8852658aa27eb23992769d6b05c (patch)
tree6b2de6c401f59ede9c7c8bd212e83595b4443919 /src
parent8c08ae193531b6f9c86f58764af598016b696260 (diff)
Create 'all_streams' verb at binding startup
Create 'all_streams' verb at binding startup, that way, it will always be created. Generate a request fail when a call is done when no streams are created. BUG-AGL: SPEC-2733 Change-Id: I1b7ec3b8ed0fcd617e4a016e455beb447d233c82 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
Diffstat (limited to 'src')
-rw-r--r--src/4a-internals-hal/4a-internals-hal-api-loader.c2
-rw-r--r--src/4a-internals-hal/4a-internals-hal-mixer-link.c15
2 files changed, 2 insertions, 15 deletions
diff --git a/src/4a-internals-hal/4a-internals-hal-api-loader.c b/src/4a-internals-hal/4a-internals-hal-api-loader.c
index 71779d7..8899f2c 100644
--- a/src/4a-internals-hal/4a-internals-hal-api-loader.c
+++ b/src/4a-internals-hal/4a-internals-hal-api-loader.c
@@ -28,6 +28,7 @@
#include <ctl-config.h>
#include "4a-hal-utilities-hal-api-handler.h"
+#include "4a-hal-utilities-hal-streams-handler.h"
#include "4a-internals-hal-api-loader.h"
#include "4a-internals-hal-alsacore-link.h"
@@ -62,6 +63,7 @@ static afb_verb_t InternalHalApiStaticVerbs[] =
{ .verb = "info", .callback = InternalHalInfo, .info = "List available streams/controls for this api" },
{ .verb = "subscribe", .callback = InternalHalSubscribe, .info = "Subscribe to event(s) for values changes (streams/controls) for this api" },
{ .verb = "unsubscribe", .callback = InternalHalUnsubscribe, .info = "Unsubscribe to event(s) for values changes (streams/controls) for this api" },
+ { .verb = HAL_ALL_STREAMS_VERB, .callback = HalUtlActionOnAllStream, .info = "Send a stream action on all streams" },
{ .verb = NULL } // Marker for end of the array
};
diff --git a/src/4a-internals-hal/4a-internals-hal-mixer-link.c b/src/4a-internals-hal/4a-internals-hal-mixer-link.c
index 42b64d7..96e5552 100644
--- a/src/4a-internals-hal/4a-internals-hal-mixer-link.c
+++ b/src/4a-internals-hal/4a-internals-hal-mixer-link.c
@@ -133,21 +133,6 @@ int InternalHalHandleMixerAttachResponse(afb_api_t apiHandle, struct InternalHal
}
}
- if(cds_list_empty(&currentHalSpecificData->streamsDataListHead)) {
- AFB_API_WARNING(apiHandle, "No stream detected in mixer response, %s verb won't be created", HAL_ALL_STREAMS_VERB);
- }
- else if(afb_api_add_verb(apiHandle,
- HAL_ALL_STREAMS_VERB,
- "Send a stream action on all streams",
- HalUtlActionOnAllStream,
- (void *) &currentHalSpecificData->streamsDataListHead,
- NULL,
- 0,
- 0)) {
- AFB_API_ERROR(apiHandle, "Error while creating verb for all streams : '%s'", HAL_ALL_STREAMS_VERB);
- return -4;
- }
-
return 0;
}