mirror of
https://github.com/systemd/systemd.git
synced 2024-11-04 22:21:55 +03:00
varlink: add API for determining number of current connections
This commit is contained in:
parent
d98580e438
commit
c4f601f205
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user