aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/audio/audio-api.c3
-rw-r--r--plugins/radio/radio-api.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/plugins/audio/audio-api.c b/plugins/audio/audio-api.c
index 3877ce5b..8350377d 100644
--- a/plugins/audio/audio-api.c
+++ b/plugins/audio/audio-api.c
@@ -64,7 +64,8 @@ STATIC json_object* init (AFB_request *request) { /* AFB_SESSION_CHECK */
int idx;
/* create a private client context */
- request->context = initAudioCtx();
+ if (!request->context)
+ request->context = initAudioCtx();
_alsa_init("default", request->context);
diff --git a/plugins/radio/radio-api.c b/plugins/radio/radio-api.c
index b09cea86..d6855fea 100644
--- a/plugins/radio/radio-api.c
+++ b/plugins/radio/radio-api.c
@@ -131,7 +131,8 @@ STATIC json_object* init (AFB_request *request) { /* AFB_SESSION_CHECK */
json_object *jresp;
/* create a private client context */
- request->context = initRadioCtx();
+ if (!request->context)
+ request->context = initRadioCtx();
jresp = json_object_new_object();
json_object_object_add(jresp, "info", json_object_new_string ("Radio initialized"));