diff options
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.c | 5 |
1 files changed, 4 insertions, 1 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 57bc079..3d45260 100644 --- a/4a-hal/4a-hal-controllers/4a-hal-controllers-cb.c +++ b/4a-hal/4a-hal-controllers/4a-hal-controllers-cb.c @@ -68,7 +68,10 @@ void HalCtlsDispatchApiEvent(afb_dynapi *apiHandle, const char *evtLabel, json_o snprintf(cardIdString, 6, "hw:%i", currentHalData->sndCardId); currentHalAlsaCtlsT = currentHalData->ctlHalSpecificData->ctlHalAlsaMapT; - asprintf(&alsaCoreLabel, "%s/%s", ALSACORE_API, cardIdString); + if(asprintf(&alsaCoreLabel, "%s/%s", ALSACORE_API, cardIdString) < 0) { + AFB_ApiError(apiHandle, "%s: Didn't succeed to generate string for alascore events catching", __func__); + return; + } if(strcmp(evtLabel, alsaCoreLabel) == 0 && ! wrap_json_unpack(eventJ, "{s:i s:o !}", "id", &numid, "val", &valuesJ)) { |