mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-08 22:15:21 +00:00
virNetServerPreExecRestart: Drop error reporting from virJSONValueObjectAppend* calls
The functions report errors already and the error can nowadays only happen on programmer errors (if the passed virJSONValue isn't an object), which won't happen. Remove the reporting. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
edc09e83da
commit
6e35dc7bbe
@ -556,51 +556,29 @@ virJSONValuePtr virNetServerPreExecRestart(virNetServerPtr srv)
|
||||
virObjectLock(srv);
|
||||
|
||||
if (virJSONValueObjectAppendNumberUint(object, "min_workers",
|
||||
virThreadPoolGetMinWorkers(srv->workers)) < 0) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
_("Cannot set min_workers data in JSON document"));
|
||||
virThreadPoolGetMinWorkers(srv->workers)) < 0)
|
||||
goto error;
|
||||
}
|
||||
if (virJSONValueObjectAppendNumberUint(object, "max_workers",
|
||||
virThreadPoolGetMaxWorkers(srv->workers)) < 0) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
_("Cannot set max_workers data in JSON document"));
|
||||
virThreadPoolGetMaxWorkers(srv->workers)) < 0)
|
||||
goto error;
|
||||
}
|
||||
if (virJSONValueObjectAppendNumberUint(object, "priority_workers",
|
||||
virThreadPoolGetPriorityWorkers(srv->workers)) < 0) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
_("Cannot set priority_workers data in JSON document"));
|
||||
virThreadPoolGetPriorityWorkers(srv->workers)) < 0)
|
||||
goto error;
|
||||
}
|
||||
if (virJSONValueObjectAppendNumberUint(object, "max_clients", srv->nclients_max) < 0) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
_("Cannot set max_clients data in JSON document"));
|
||||
|
||||
if (virJSONValueObjectAppendNumberUint(object, "max_clients", srv->nclients_max) < 0)
|
||||
goto error;
|
||||
}
|
||||
if (virJSONValueObjectAppendNumberUint(object, "max_anonymous_clients",
|
||||
srv->nclients_unauth_max) < 0) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
_("Cannot set max_anonymous_clients data in JSON document"));
|
||||
srv->nclients_unauth_max) < 0)
|
||||
goto error;
|
||||
}
|
||||
if (virJSONValueObjectAppendNumberUint(object, "keepaliveInterval", srv->keepaliveInterval) < 0) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
_("Cannot set keepaliveInterval data in JSON document"));
|
||||
|
||||
if (virJSONValueObjectAppendNumberUint(object, "keepaliveInterval", srv->keepaliveInterval) < 0)
|
||||
goto error;
|
||||
}
|
||||
if (virJSONValueObjectAppendNumberUint(object, "keepaliveCount", srv->keepaliveCount) < 0) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
_("Cannot set keepaliveCount data in JSON document"));
|
||||
if (virJSONValueObjectAppendNumberUint(object, "keepaliveCount", srv->keepaliveCount) < 0)
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (virJSONValueObjectAppendNumberUlong(object, "next_client_id",
|
||||
srv->next_client_id) < 0) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
_("Cannot set next_client_id data in JSON document"));
|
||||
srv->next_client_id) < 0)
|
||||
goto error;
|
||||
}
|
||||
|
||||
services = virJSONValueNewArray();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user