mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-24 05:25:18 +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);
|
virObjectLock(srv);
|
||||||
|
|
||||||
if (virJSONValueObjectAppendNumberUint(object, "min_workers",
|
if (virJSONValueObjectAppendNumberUint(object, "min_workers",
|
||||||
virThreadPoolGetMinWorkers(srv->workers)) < 0) {
|
virThreadPoolGetMinWorkers(srv->workers)) < 0)
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
|
||||||
_("Cannot set min_workers data in JSON document"));
|
|
||||||
goto error;
|
goto error;
|
||||||
}
|
|
||||||
if (virJSONValueObjectAppendNumberUint(object, "max_workers",
|
if (virJSONValueObjectAppendNumberUint(object, "max_workers",
|
||||||
virThreadPoolGetMaxWorkers(srv->workers)) < 0) {
|
virThreadPoolGetMaxWorkers(srv->workers)) < 0)
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
|
||||||
_("Cannot set max_workers data in JSON document"));
|
|
||||||
goto error;
|
goto error;
|
||||||
}
|
|
||||||
if (virJSONValueObjectAppendNumberUint(object, "priority_workers",
|
if (virJSONValueObjectAppendNumberUint(object, "priority_workers",
|
||||||
virThreadPoolGetPriorityWorkers(srv->workers)) < 0) {
|
virThreadPoolGetPriorityWorkers(srv->workers)) < 0)
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
|
||||||
_("Cannot set priority_workers data in JSON document"));
|
|
||||||
goto error;
|
goto error;
|
||||||
}
|
|
||||||
if (virJSONValueObjectAppendNumberUint(object, "max_clients", srv->nclients_max) < 0) {
|
if (virJSONValueObjectAppendNumberUint(object, "max_clients", srv->nclients_max) < 0)
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
|
||||||
_("Cannot set max_clients data in JSON document"));
|
|
||||||
goto error;
|
goto error;
|
||||||
}
|
|
||||||
if (virJSONValueObjectAppendNumberUint(object, "max_anonymous_clients",
|
if (virJSONValueObjectAppendNumberUint(object, "max_anonymous_clients",
|
||||||
srv->nclients_unauth_max) < 0) {
|
srv->nclients_unauth_max) < 0)
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
|
||||||
_("Cannot set max_anonymous_clients data in JSON document"));
|
|
||||||
goto error;
|
goto error;
|
||||||
}
|
|
||||||
if (virJSONValueObjectAppendNumberUint(object, "keepaliveInterval", srv->keepaliveInterval) < 0) {
|
if (virJSONValueObjectAppendNumberUint(object, "keepaliveInterval", srv->keepaliveInterval) < 0)
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
|
||||||
_("Cannot set keepaliveInterval data in JSON document"));
|
|
||||||
goto error;
|
goto error;
|
||||||
}
|
if (virJSONValueObjectAppendNumberUint(object, "keepaliveCount", srv->keepaliveCount) < 0)
|
||||||
if (virJSONValueObjectAppendNumberUint(object, "keepaliveCount", srv->keepaliveCount) < 0) {
|
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
|
||||||
_("Cannot set keepaliveCount data in JSON document"));
|
|
||||||
goto error;
|
goto error;
|
||||||
}
|
|
||||||
|
|
||||||
if (virJSONValueObjectAppendNumberUlong(object, "next_client_id",
|
if (virJSONValueObjectAppendNumberUlong(object, "next_client_id",
|
||||||
srv->next_client_id) < 0) {
|
srv->next_client_id) < 0)
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
|
||||||
_("Cannot set next_client_id data in JSON document"));
|
|
||||||
goto error;
|
goto error;
|
||||||
}
|
|
||||||
|
|
||||||
services = virJSONValueNewArray();
|
services = virJSONValueNewArray();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user