summaryrefslogtreecommitdiffstats
path: root/4a-hal/4a-hal-controllers/4a-hal-controllers-cb.c
diff options
context:
space:
mode:
Diffstat (limited to '4a-hal/4a-hal-controllers/4a-hal-controllers-cb.c')
-rw-r--r--4a-hal/4a-hal-controllers/4a-hal-controllers-cb.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/4a-hal/4a-hal-controllers/4a-hal-controllers-cb.c b/4a-hal/4a-hal-controllers/4a-hal-controllers-cb.c
index d648103..98d8d53 100644
--- a/4a-hal/4a-hal-controllers/4a-hal-controllers-cb.c
+++ b/4a-hal/4a-hal-controllers/4a-hal-controllers-cb.c
@@ -25,7 +25,6 @@
#include <afb/afb-binding.h>
#include "4a-hal-utilities-data.h"
-#include "4a-hal-utilities-appfw-responses-handler.h"
#include "4a-hal-controllers-cb.h"
#include "4a-hal-controllers-alsacore-link.h"
@@ -487,7 +486,7 @@ json_object *HalCtlsGetJsonArrayForControls(afb_api_t apiHandle, struct CtlHalAl
void HalCtlsInfo(afb_req_t request)
{
- char *apiToCall, *returnedStatus = NULL, *returnedInfo = NULL;
+ char *apiToCall, *returnedError = NULL, *returnedInfo = NULL;
afb_api_t apiHandle;
CtlConfigT *ctrlConfig;
@@ -521,17 +520,12 @@ void HalCtlsInfo(afb_req_t request)
return;
}
- if(HalCtlsGetInfoFromMixer(apiHandle, apiToCall, requestJson, &toReturnJ, &returnedStatus, &returnedInfo)) {
- if(returnedStatus && returnedInfo) {
- afb_req_fail_f(request,
- "mixer_info",
- "Call to mixer info verb didn't succeed with status '%s' and info '%s'",
- returnedStatus,
- returnedInfo);
- }
- else {
- afb_req_fail(request, "mixer_info", "Call to mixer info verb didn't succeed");
- }
+ if(HalCtlsGetInfoFromMixer(apiHandle, apiToCall, requestJson, &toReturnJ, &returnedError, &returnedInfo)) {
+ afb_req_fail_f(request,
+ "mixer_info",
+ "Call to mixer info verb didn't succeed with status '%s' and info '%s'",
+ returnedError ? returnedError : "not returned",
+ returnedInfo ? returnedInfo : "not returned");
return;
}