From ca46756cd80d34fac3f8ce9b3b126e537b09112f Mon Sep 17 00:00:00 2001 From: David Tardon Date: Mon, 30 Oct 2023 10:42:17 +0100 Subject: varlink: add generic impl. of io.systemd.varlink.Ping() --- src/shared/varlink-io.systemd.service.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/shared/varlink-io.systemd.service.c') diff --git a/src/shared/varlink-io.systemd.service.c b/src/shared/varlink-io.systemd.service.c index 5831581445..4b3240da7c 100644 --- a/src/shared/varlink-io.systemd.service.c +++ b/src/shared/varlink-io.systemd.service.c @@ -16,3 +16,14 @@ VARLINK_DEFINE_INTERFACE( &vl_method_Ping, &vl_method_Reload, &vl_method_SetLogLevel); + +int varlink_method_ping(Varlink *link, JsonVariant *parameters, VarlinkMethodFlags flags, void *userdata) { + assert(link); + + if (json_variant_elements(parameters) > 0) + return varlink_error_invalid_parameter(link, parameters); + + log_debug("Received io.systemd.service.Ping"); + + return varlink_reply(link, NULL); +} -- cgit v1.2.3