Fix hardcoded limit on client requests in RPC code

The virNetServerClient object had a hardcoded limit of 10 requests
per client. Extend constructor to allow it to be passed in as a
configurable variable. Wire this up to the 'max_client_requests'
config parameter in libvirtd

* daemon/libvirtd.c: Pass max_client_requests into services
* src/rpc/virnetserverservice.c, src/rpc/virnetserverservice.h: Pass
  nrequests_client_max to clients
* src/rpc/virnetserverclient.c, src/rpc/virnetserverclient.h: Allow
  configurable request limit
This commit is contained in:
Daniel P. Berrange
2011-06-30 11:45:55 +01:00
parent e5b9f355b0
commit 27111b350f
5 changed files with 15 additions and 1 deletions

View File

@@ -486,6 +486,7 @@ static int daemonSetupNetworking(virNetServerPtr srv,
unix_sock_gid,
config->auth_unix_rw,
false,
config->max_client_requests,
NULL)))
goto error;
if (sock_path_ro &&
@@ -494,6 +495,7 @@ static int daemonSetupNetworking(virNetServerPtr srv,
unix_sock_gid,
config->auth_unix_ro,
true,
config->max_client_requests,
NULL)))
goto error;
@@ -509,6 +511,7 @@ static int daemonSetupNetworking(virNetServerPtr srv,
config->tcp_port,
config->auth_tcp,
false,
config->max_client_requests,
NULL)))
goto error;
@@ -543,6 +546,7 @@ static int daemonSetupNetworking(virNetServerPtr srv,
config->tls_port,
config->auth_tls,
false,
config->max_client_requests,
ctxt))) {
virNetTLSContextFree(ctxt);
goto error;