aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2018-06-01 07:35:02 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2018-06-14 15:19:08 +0200
commitb13e73d8452f5e40a8465b37b22e8a299fb036ae (patch)
tree6904fd7a9e8e80e16780e22dbe390542efb4d0d4
parent7da4612dd8c79202d443c8fdcc8e7ca39c452af0 (diff)
afm-user-daemon: Update to future version of app-framework-binder
It will become necessarily to perform actions on behlf of the client, not for its own credentials. Change-Id: Ie2f50dd84df8b0b673772575f5c21ebec8a317f8 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
-rw-r--r--src/afm-user-daemon.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/afm-user-daemon.c b/src/afm-user-daemon.c
index 22c3d81..14977b0 100644
--- a/src/afm-user-daemon.c
+++ b/src/afm-user-daemon.c
@@ -193,12 +193,17 @@ static void propagate(struct sd_bus_message *smsg, struct json_object *obj, void
{
int rc;
const char *verb = closure;
+ const char *onbehalf = NULL; /* TODO: on behalf of the client */
INFO("method %s propagated for %s", verb, json_object_to_json_string(obj));
if (!pws)
jbus_reply_error_s(smsg, "disconnected");
else {
+#if defined(AFB_PROTO_WS_VERSION) && (AFB_PROTO_WS_VERSION >= 3)
+ rc = afb_proto_ws_client_call(pws, verb, obj, sessionid, smsg, onbehalf);
+#else
rc = afb_proto_ws_client_call(pws, verb, obj, sessionid, smsg);
+#endif
if (rc < 0)
ERROR("calling %s(%s) failed: %m\n", verb, json_object_to_json_string(obj));
}