diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/lib/bluealsa/hal-bluealsa.c | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/plugins/lib/bluealsa/hal-bluealsa.c b/plugins/lib/bluealsa/hal-bluealsa.c index 853ab05..b2d4537 100644 --- a/plugins/lib/bluealsa/hal-bluealsa.c +++ b/plugins/lib/bluealsa/hal-bluealsa.c @@ -436,7 +436,6 @@ static int halBlueAlsaAttachTransportStreams(bluealsa_transport_t * transport) { hal_bluealsa_plugin_data_t * pluginData=getPluginContext(plugin); json_object* requestJ = NULL; - json_object* returnJ = NULL; json_object* sourceJ = NULL; json_object* playbackJ = NULL; @@ -556,16 +555,11 @@ static int halBlueAlsaAttachTransportStreams(bluealsa_transport_t * transport) { /* In softmixer, this will create a transaction verb (whose name is transactionUidS), * will be used later to destroy all the created objects upon transport removal */ - if (afb_api_call_sync(plugin->api, SMIXER_API_NAME, "attach", requestJ, &returnJ, NULL, NULL)) { - AFB_API_ERROR(plugin->api, "Error calling attach verb of mixer" ); - goto done; - } + /* a call sync is forbidden, because we in the context of an event io */ + afb_api_call(plugin->api, SMIXER_API_NAME, "attach", requestJ, NULL, NULL); transport->transactionUidS = transactionUidS; - if (returnJ) - json_object_put(returnJ); - ret = 0; goto done; @@ -581,7 +575,6 @@ static int halBluezAlsaRemoveTransportStream(bluealsa_transport_t * transport) { CtlPluginT * plugin = transport->watch->plugin; json_object* requestJ = NULL; - json_object* returnJ = NULL; AFB_API_INFO(plugin->api, "Call transaction detach verb %s", transport->transactionUidS); if (transport->transactionUidS == NULL) @@ -593,14 +586,8 @@ static int halBluezAlsaRemoveTransportStream(bluealsa_transport_t * transport) { json_object_object_add(requestJ, "action", json_object_new_string("remove")); - if (afb_api_call_sync(plugin->api, SMIXER_API_NAME, transport->transactionUidS, requestJ, &returnJ, NULL, NULL)) { - AFB_API_ERROR(plugin->api, "Error calling attach verb of mixer" ); - goto fail; - } - - if (returnJ) - json_object_put(returnJ); - + /* a call sync is forbidden, because we in the context of an event io */ + afb_api_call(plugin->api, SMIXER_API_NAME, transport->transactionUidS, requestJ, NULL, NULL); return 0; fail: |