summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2016-03-16 16:06:09 +0100
committerJosé Bollo <jose.bollo@iot.bzh>2016-03-16 17:31:19 +0100
commitabfae2b6d73d7be40ffbff8e8429f71d82df90b5 (patch)
treedeb7bb7a97d746e4f44ee7473848411baf5a2e71
parent4beb46997ba758a83fb3d63dc0034cf695155485 (diff)
afm-user-daemon: use new closure behaviour
Change-Id: I67b4904251d2525ff98c3fcf7803880eab7e6db4 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
-rw-r--r--src/afm-user-daemon.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/afm-user-daemon.c b/src/afm-user-daemon.c
index cbb51e5..2b7ec7a 100644
--- a/src/afm-user-daemon.c
+++ b/src/afm-user-daemon.c
@@ -334,6 +334,7 @@ static void propagate(struct jreq *jreq, const char *msg, const char *method)
jbus_reply_error_s(jreq, error_system);
}
+#if defined(EXPLICIT_CALL)
/*
* On query "install" from 'jreq' with parameters of 'msg'.
*/
@@ -349,6 +350,7 @@ static void on_uninstall(struct jreq *jreq, const char *msg, void *unused)
{
return propagate(jreq, msg, "uninstall");
}
+#endif
/*
* On system signaling that applications list changed
@@ -502,8 +504,13 @@ int main(int ac, char **av)
|| jbus_add_service_j(user_bus, "continue", on_continue, NULL)
|| jbus_add_service_j(user_bus, "runners", on_runners, NULL)
|| jbus_add_service_j(user_bus, "state", on_state, NULL)
+#if defined(EXPLICIT_CALL)
|| jbus_add_service_s(user_bus, "install", on_install, NULL)
|| jbus_add_service_s(user_bus, "uninstall", on_uninstall, NULL)) {
+#else
+ || jbus_add_service_s(user_bus, "install", (void (*)(struct jreq *, const char *, void *))propagate, "install")
+ || jbus_add_service_s(user_bus, "uninstall", (void (*)(struct jreq *, const char *, void *))propagate, "uninstall")) {
+#endif
ERROR("adding services failed");
return 1;
}