diff options
Diffstat (limited to 'alsa-hook/PolicyAlsaHook.c')
-rw-r--r-- | alsa-hook/PolicyAlsaHook.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/alsa-hook/PolicyAlsaHook.c b/alsa-hook/PolicyAlsaHook.c index 50c603b..3a48f83 100644 --- a/alsa-hook/PolicyAlsaHook.c +++ b/alsa-hook/PolicyAlsaHook.c @@ -230,11 +230,23 @@ static void OnFailureCB(void* UNUSED_ARG(ctx), void* handle, const char *status, sem_post (&afbClient->semaphore); } +#if defined(AFB_PROTO_WS_VERSION) && (AFB_PROTO_WS_VERSION >= 3) +static void OnReplyCB(void* ctx, void* handle, json_object* responseJ, const char *error, const char *info) { + if (error) + OnFailureCB(ctx, handle, error, info); + else + OnSuccessCB(ctx , handle, responseJ, info); +} +#endif /* the callback interface for pws */ static struct afb_proto_ws_client_itf itf = { +#if defined(AFB_PROTO_WS_VERSION) && (AFB_PROTO_WS_VERSION >= 3) + .on_reply = OnReplyCB, +#else .on_reply_success = OnSuccessCB, .on_reply_fail = OnFailureCB, +#endif .on_event_create = NULL, .on_event_remove = NULL, .on_event_subscribe = NULL, |