diff --git a/src/shared/varlink.c b/src/shared/varlink.c index 77cea00cb9d..4295eb7ce2f 100644 --- a/src/shared/varlink.c +++ b/src/shared/varlink.c @@ -2460,6 +2460,12 @@ int varlink_server_set_connections_max(VarlinkServer *s, unsigned m) { return 0; } +unsigned varlink_server_current_connections(VarlinkServer *s) { + assert_return(s, UINT_MAX); + + return s->n_connections; +} + int varlink_server_set_description(VarlinkServer *s, const char *description) { assert_return(s, -EINVAL); diff --git a/src/shared/varlink.h b/src/shared/varlink.h index 0d9617d4035..6272b332280 100644 --- a/src/shared/varlink.h +++ b/src/shared/varlink.h @@ -150,6 +150,8 @@ unsigned varlink_server_connections_per_uid_max(VarlinkServer *s); int varlink_server_set_connections_per_uid_max(VarlinkServer *s, unsigned m); int varlink_server_set_connections_max(VarlinkServer *s, unsigned m); +unsigned varlink_server_current_connections(VarlinkServer *s); + int varlink_server_set_description(VarlinkServer *s, const char *description); DEFINE_TRIVIAL_CLEANUP_FUNC(Varlink *, varlink_unref);