summaryrefslogtreecommitdiffstats
path: root/src/resolve/resolved-varlink.c
diff options
context:
space:
mode:
authorKiran Vemula <10357630+KiranVKumar@users.noreply.github.com>2023-08-15 12:45:58 +0200
committerGitHub <noreply@github.com>2023-08-15 12:45:58 +0200
commita67e5c6e371f3a3facd2d2d0d636d335f662c0ae (patch)
tree5ff58528686acfb4c12d4285c5337093d7440ecb /src/resolve/resolved-varlink.c
parentp11kit: check the flags associated with the slot instead of flags associated ... (diff)
downloadsystemd-a67e5c6e371f3a3facd2d2d0d636d335f662c0ae.tar.xz
systemd-a67e5c6e371f3a3facd2d2d0d636d335f662c0ae.zip
resolved: fixed bugs reported in varlink statistics (#28796)
Fixes https://github.com/systemd/systemd/issues/28791 Follow-up for bc837621a38efbaff14fbe33bfe5c34dac805343
Diffstat (limited to 'src/resolve/resolved-varlink.c')
-rw-r--r--src/resolve/resolved-varlink.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/resolve/resolved-varlink.c b/src/resolve/resolved-varlink.c
index dffdfb0cd0..b27cf90435 100644
--- a/src/resolve/resolved-varlink.c
+++ b/src/resolve/resolved-varlink.c
@@ -670,8 +670,7 @@ static int vl_method_dump_statistics(Varlink *link, JsonVariant *parameters, Var
if (r < 0)
return r;
- return varlink_replyb(link, JSON_BUILD_OBJECT(
- JSON_BUILD_PAIR("statistics", JSON_BUILD_VARIANT(j))));
+ return varlink_replyb(link, JSON_BUILD_VARIANT(j));
}
static int vl_method_reset_statistics(Varlink *link, JsonVariant *parameters, VarlinkMethodFlags flags, void *userdata) {
@@ -684,10 +683,9 @@ static int vl_method_reset_statistics(Varlink *link, JsonVariant *parameters, Va
m = ASSERT_PTR(varlink_server_get_userdata(varlink_get_server(link)));
- dns_manager_reset_satistics(m);
+ dns_manager_reset_statistics(m);
- return varlink_replyb(link, JSON_BUILD_OBJECT(
- JSON_BUILD_PAIR("success", JSON_BUILD_BOOLEAN(true))));
+ return varlink_replyb(link, JSON_BUILD_EMPTY_OBJECT);
}
static int varlink_monitor_server_init(Manager *m) {