aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/lib/bluealsa/hal-bluealsa.c21
1 files changed, 4 insertions, 17 deletions
diff --git a/plugins/lib/bluealsa/hal-bluealsa.c b/plugins/lib/bluealsa/hal-bluealsa.c
index ebc0560..10a61ae 100644
--- a/plugins/lib/bluealsa/hal-bluealsa.c
+++ b/plugins/lib/bluealsa/hal-bluealsa.c
@@ -442,7 +442,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;
@@ -562,16 +561,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;
@@ -587,7 +581,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)
@@ -599,14 +592,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: