summaryrefslogtreecommitdiffstats
path: root/Common
diff options
context:
space:
mode:
authorfulup <fulup.arfoll@iot.bzh>2017-04-02 12:14:27 +0200
committerfulup <fulup.arfoll@iot.bzh>2017-04-02 12:14:27 +0200
commitc75c329e08f4c189419aa4c5607f38890885b46c (patch)
treeb59f8c28b1bf5dd8a9516603116ac291b458e742 /Common
parent228e67731c2772538dcedf6617e74130934428ed (diff)
parentbe16842c8756bf527f35fabac4ecc5beb215c411 (diff)
Merge branch 'master' of github.com:iotbzh/audio-bindings
Diffstat (limited to 'Common')
-rw-r--r--Common/AudioCommonLib.c7
-rw-r--r--Common/AudioCommonLib.h2
2 files changed, 5 insertions, 4 deletions
diff --git a/Common/AudioCommonLib.c b/Common/AudioCommonLib.c
index 0517e8e..0055896 100644
--- a/Common/AudioCommonLib.c
+++ b/Common/AudioCommonLib.c
@@ -53,15 +53,16 @@ OnErrorExit:
return (-1);
}
+
// This function should be part of Generic AGL Framework
-PUBLIC json_object* afb_service_call_sync(struct afb_service srvitf, struct afb_req request, char* api, char* verb, struct json_object* queryurl, void *handle) {
+PUBLIC json_object* afb_service_call_sync(struct afb_service srvitf, struct afb_req request, char* api, char* verb, struct json_object* queryurl) {
json_object* response = NULL;
int status = 0;
sem_t semid;
// Nested procedure are allow in GNU and allow us to keep caller stack valid
- void callback(void *handle, int iserror, struct json_object * result) {
+ void callback(void *handle, int iserror, struct json_object *result) {
// Process Basic Error
if (!cbCheckResponse(request, iserror, result)) {
@@ -88,7 +89,7 @@ OnExitCB:
}
// Call service and wait for call back to finish before moving any further
- afb_service_call(srvitf, "alsacore", "getctl", queryurl, callback, handle);
+ afb_service_call(srvitf, api, verb, queryurl, callback, NULL);
sem_wait(&semid);
OnExit:
diff --git a/Common/AudioCommonLib.h b/Common/AudioCommonLib.h
index ebee389..ffefbfc 100644
--- a/Common/AudioCommonLib.h
+++ b/Common/AudioCommonLib.h
@@ -61,7 +61,7 @@ typedef enum {
} halCtlsEnumT;
PUBLIC int cbCheckResponse(struct afb_req request, int iserror, struct json_object *result) ;
-PUBLIC json_object* afb_service_call_sync(struct afb_service srvitf, struct afb_req request, char* api, char* verb, struct json_object* queryurl, void *handle);
+PUBLIC json_object* afb_service_call_sync(struct afb_service srvitf, struct afb_req request, char* api, char* verb, struct json_object* queryurl);
PUBLIC void pingtest(struct afb_req request);
#endif /* AUDIOCOMMON_H */