# define HYPER_TO_TYPE(_type, _to, _from) \
do { \
if ((_from) != (_type)(_from)) { \
- remoteError(VIR_ERR_INTERNAL_ERROR, \
- _("conversion from hyper to %s overflowed"), #_type); \
+ virReportError(VIR_ERR_INTERNAL_ERROR, \
+ _("conversion from hyper to %s overflowed"), #_type); \
goto done; \
} \
(_to) = (_from); \
virConnectAuthPtr auth);
#endif /* HAVE_POLKIT */
-#define remoteError(code, ...) \
- virReportErrorHelper(VIR_FROM_REMOTE, code, __FILE__, \
- __FUNCTION__, __LINE__, __VA_ARGS__)
-
static virDomainPtr get_nonnull_domain (virConnectPtr conn, remote_nonnull_domain domain);
static virNetworkPtr get_nonnull_network (virConnectPtr conn, remote_nonnull_network network);
static virNWFilterPtr get_nonnull_nwfilter (virConnectPtr conn, remote_nonnull_nwfilter nwfilter);
transport = trans_tls;
else if (STRCASEEQ (transport_str, "unix")) {
if (conn->uri->server) {
- remoteError(VIR_ERR_INVALID_ARG,
- _("using unix socket and remote "
- "server '%s' is not supported."),
- conn->uri->server);
+ virReportError(VIR_ERR_INVALID_ARG,
+ _("using unix socket and remote "
+ "server '%s' is not supported."),
+ conn->uri->server);
return VIR_DRV_OPEN_ERROR;
} else {
transport = trans_unix;
else if (STRCASEEQ (transport_str, "tcp"))
transport = trans_tcp;
else {
- remoteError(VIR_ERR_INVALID_ARG, "%s",
- _("remote_open: transport in URL not recognised "
- "(should be tls|unix|ssh|ext|tcp)"));
+ virReportError(VIR_ERR_INVALID_ARG, "%s",
+ _("remote_open: transport in URL not recognised "
+ "(should be tls|unix|ssh|ext|tcp)"));
return VIR_DRV_OPEN_ERROR;
}
}
/* For ext transport, command is required. */
if (transport == trans_ext && !command) {
- remoteError(VIR_ERR_INVALID_ARG, "%s",
- _("remote_open: for 'ext' transport, command is required"));
+ virReportError(VIR_ERR_INVALID_ARG, "%s",
+ _("remote_open: for 'ext' transport, command is required"));
goto failed;
}
}
if (!(daemonPath = remoteFindDaemonPath())) {
- remoteError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("Unable to locate libvirtd daemon in $PATH"));
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Unable to locate libvirtd daemon in $PATH"));
goto failed;
}
if (!(priv->client = virNetClientNewUNIX(sockname,
case trans_unix:
case trans_ssh:
case trans_ext:
- remoteError(VIR_ERR_INVALID_ARG, "%s",
- _("transport methods unix, ssh and ext are not supported "
- "under Windows"));
+ virReportError(VIR_ERR_INVALID_ARG, "%s",
+ _("transport methods unix, ssh and ext are not supported "
+ "under Windows"));
goto failed;
#endif /* WIN32 */
}
if (virMutexInit(&priv->lock) < 0) {
- remoteError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("cannot initialize mutex"));
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("cannot initialize mutex"));
VIR_FREE(priv);
return NULL;
}
/* Check the length of the returned list carefully. */
if (ret.params.params_len > REMOTE_NODE_CPU_STATS_MAX ||
ret.params.params_len > *nparams) {
- remoteError(VIR_ERR_RPC, "%s",
- _("remoteNodeGetCPUStats: "
- "returned number of stats exceeds limit"));
+ virReportError(VIR_ERR_RPC, "%s",
+ _("remoteNodeGetCPUStats: "
+ "returned number of stats exceeds limit"));
goto cleanup;
}
/* Handle the case when the caller does not know the number of stats
/* Deserialise the result. */
for (i = 0; i < *nparams; ++i) {
if (virStrcpyStatic(params[i].field, ret.params.params_val[i].field) == NULL) {
- remoteError(VIR_ERR_INTERNAL_ERROR,
- _("Stats %s too big for destination"),
- ret.params.params_val[i].field);
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("Stats %s too big for destination"),
+ ret.params.params_val[i].field);
goto cleanup;
}
params[i].value = ret.params.params_val[i].value;
/* Check the length of the returned list carefully. */
if (ret.params.params_len > REMOTE_NODE_MEMORY_STATS_MAX ||
ret.params.params_len > *nparams) {
- remoteError(VIR_ERR_RPC, "%s",
- _("remoteNodeGetMemoryStats: "
- "returned number of stats exceeds limit"));
+ virReportError(VIR_ERR_RPC, "%s",
+ _("remoteNodeGetMemoryStats: "
+ "returned number of stats exceeds limit"));
goto cleanup;
}
/* Handle the case when the caller does not know the number of stats
/* Deserialise the result. */
for (i = 0; i < *nparams; ++i) {
if (virStrcpyStatic(params[i].field, ret.params.params_val[i].field) == NULL) {
- remoteError(VIR_ERR_INTERNAL_ERROR,
- _("Stats %s too big for destination"),
- ret.params.params_val[i].field);
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("Stats %s too big for destination"),
+ ret.params.params_val[i].field);
goto cleanup;
}
params[i].value = ret.params.params_val[i].value;
remoteDriverLock(priv);
if (maxCells > REMOTE_NODE_MAX_CELLS) {
- remoteError(VIR_ERR_RPC,
- _("too many NUMA cells: %d > %d"),
- maxCells, REMOTE_NODE_MAX_CELLS);
+ virReportError(VIR_ERR_RPC,
+ _("too many NUMA cells: %d > %d"),
+ maxCells, REMOTE_NODE_MAX_CELLS);
goto done;
}
remoteDriverLock(priv);
if (maxids > REMOTE_DOMAIN_ID_LIST_MAX) {
- remoteError(VIR_ERR_RPC,
- _("too many remote domain IDs: %d > %d"),
- maxids, REMOTE_DOMAIN_ID_LIST_MAX);
+ virReportError(VIR_ERR_RPC,
+ _("too many remote domain IDs: %d > %d"),
+ maxids, REMOTE_DOMAIN_ID_LIST_MAX);
goto done;
}
args.maxids = maxids;
goto done;
if (ret.ids.ids_len > maxids) {
- remoteError(VIR_ERR_RPC,
- _("too many remote domain IDs: %d > %d"),
- ret.ids.ids_len, maxids);
+ virReportError(VIR_ERR_RPC,
+ _("too many remote domain IDs: %d > %d"),
+ ret.ids.ids_len, maxids);
goto cleanup;
}
}
break;
default:
- remoteError(VIR_ERR_RPC, _("unknown parameter type: %d"),
- params[i].type);
+ virReportError(VIR_ERR_RPC, _("unknown parameter type: %d"),
+ params[i].type);
goto cleanup;
}
}
/* Check the length of the returned list carefully. */
if (ret_params_len > limit || ret_params_len > *nparams) {
- remoteError(VIR_ERR_RPC, "%s",
- _("returned number of parameters exceeds limit"));
+ virReportError(VIR_ERR_RPC, "%s",
+ _("returned number of parameters exceeds limit"));
goto cleanup;
}
for (i = 0; i < ret_params_len; ++i) {
if (virStrcpyStatic(params[i].field,
ret_params_val[i].field) == NULL) {
- remoteError(VIR_ERR_INTERNAL_ERROR,
- _("Parameter %s too big for destination"),
- ret_params_val[i].field);
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("Parameter %s too big for destination"),
+ ret_params_val[i].field);
goto cleanup;
}
params[i].type = ret_params_val[i].value.type;
}
break;
default:
- remoteError(VIR_ERR_RPC, _("unknown parameter type: %d"),
- params[i].type);
+ virReportError(VIR_ERR_RPC, _("unknown parameter type: %d"),
+ params[i].type);
goto cleanup;
}
}
int j;
if (ret_errors_len > limit || ret_errors_len > maxerrors) {
- remoteError(VIR_ERR_RPC, "%s",
- _("returned number of disk errors exceeds limit"));
+ virReportError(VIR_ERR_RPC, "%s",
+ _("returned number of disk errors exceeds limit"));
goto error;
}
/* Check the length of the returned list carefully. */
if (ret.params.params_len > REMOTE_DOMAIN_BLOCK_STATS_PARAMETERS_MAX ||
ret.params.params_len > *nparams) {
- remoteError(VIR_ERR_RPC, "%s",
- _("remoteDomainBlockStatsFlags: "
- "returned number of stats exceeds limit"));
+ virReportError(VIR_ERR_RPC, "%s",
+ _("remoteDomainBlockStatsFlags: "
+ "returned number of stats exceeds limit"));
goto cleanup;
}
remoteDriverLock(priv);
if (ncpumaps > REMOTE_VCPUINFO_MAX) {
- remoteError(VIR_ERR_RPC,
- _("vCPU count exceeds maximum: %d > %d"),
- ncpumaps, REMOTE_VCPUINFO_MAX);
+ virReportError(VIR_ERR_RPC,
+ _("vCPU count exceeds maximum: %d > %d"),
+ ncpumaps, REMOTE_VCPUINFO_MAX);
goto done;
}
if (INT_MULTIPLY_OVERFLOW(ncpumaps, maplen) ||
ncpumaps * maplen > REMOTE_CPUMAPS_MAX) {
- remoteError(VIR_ERR_RPC,
- _("vCPU map buffer length exceeds maximum: %d > %d"),
- ncpumaps * maplen, REMOTE_CPUMAPS_MAX);
+ virReportError(VIR_ERR_RPC,
+ _("vCPU map buffer length exceeds maximum: %d > %d"),
+ ncpumaps * maplen, REMOTE_CPUMAPS_MAX);
goto done;
}
goto done;
if (ret.num > ncpumaps) {
- remoteError(VIR_ERR_RPC,
- _("host reports too many vCPUs: %d > %d"),
- ret.num, ncpumaps);
+ virReportError(VIR_ERR_RPC,
+ _("host reports too many vCPUs: %d > %d"),
+ ret.num, ncpumaps);
goto cleanup;
}
if (ret.cpumaps.cpumaps_len > ncpumaps * maplen) {
- remoteError(VIR_ERR_RPC,
- _("host reports map buffer length exceeds maximum: %d > %d"),
- ret.cpumaps.cpumaps_len, ncpumaps * maplen);
+ virReportError(VIR_ERR_RPC,
+ _("host reports map buffer length exceeds maximum: %d > %d"),
+ ret.cpumaps.cpumaps_len, ncpumaps * maplen);
goto cleanup;
}
remoteDriverLock(priv);
if (maxinfo > REMOTE_VCPUINFO_MAX) {
- remoteError(VIR_ERR_RPC,
- _("vCPU count exceeds maximum: %d > %d"),
- maxinfo, REMOTE_VCPUINFO_MAX);
+ virReportError(VIR_ERR_RPC,
+ _("vCPU count exceeds maximum: %d > %d"),
+ maxinfo, REMOTE_VCPUINFO_MAX);
goto done;
}
if (INT_MULTIPLY_OVERFLOW(maxinfo, maplen) ||
maxinfo * maplen > REMOTE_CPUMAPS_MAX) {
- remoteError(VIR_ERR_RPC,
- _("vCPU map buffer length exceeds maximum: %d > %d"),
- maxinfo * maplen, REMOTE_CPUMAPS_MAX);
+ virReportError(VIR_ERR_RPC,
+ _("vCPU map buffer length exceeds maximum: %d > %d"),
+ maxinfo * maplen, REMOTE_CPUMAPS_MAX);
goto done;
}
goto done;
if (ret.info.info_len > maxinfo) {
- remoteError(VIR_ERR_RPC,
- _("host reports too many vCPUs: %d > %d"),
- ret.info.info_len, maxinfo);
+ virReportError(VIR_ERR_RPC,
+ _("host reports too many vCPUs: %d > %d"),
+ ret.info.info_len, maxinfo);
goto cleanup;
}
if (ret.cpumaps.cpumaps_len > maxinfo * maplen) {
- remoteError(VIR_ERR_RPC,
- _("host reports map buffer length exceeds maximum: %d > %d"),
- ret.cpumaps.cpumaps_len, maxinfo * maplen);
+ virReportError(VIR_ERR_RPC,
+ _("host reports map buffer length exceeds maximum: %d > %d"),
+ ret.cpumaps.cpumaps_len, maxinfo * maplen);
goto cleanup;
}
if (ret.label.label_val != NULL) {
if (strlen (ret.label.label_val) >= sizeof(seclabel->label)) {
- remoteError(VIR_ERR_RPC, _("security label exceeds maximum: %zu"),
- sizeof(seclabel->label) - 1);
+ virReportError(VIR_ERR_RPC, _("security label exceeds maximum: %zu"),
+ sizeof(seclabel->label) - 1);
goto cleanup;
}
strcpy (seclabel->label, ret.label.label_val);
if (ret.model.model_val != NULL) {
if (strlen (ret.model.model_val) >= sizeof(secmodel->model)) {
- remoteError(VIR_ERR_RPC, _("security model exceeds maximum: %zu"),
- sizeof(secmodel->model) - 1);
+ virReportError(VIR_ERR_RPC, _("security model exceeds maximum: %zu"),
+ sizeof(secmodel->model) - 1);
goto cleanup;
}
strcpy (secmodel->model, ret.model.model_val);
if (ret.doi.doi_val != NULL) {
if (strlen (ret.doi.doi_val) >= sizeof(secmodel->doi)) {
- remoteError(VIR_ERR_RPC, _("security doi exceeds maximum: %zu"),
- sizeof(secmodel->doi) - 1);
+ virReportError(VIR_ERR_RPC, _("security doi exceeds maximum: %zu"),
+ sizeof(secmodel->doi) - 1);
goto cleanup;
}
strcpy (secmodel->doi, ret.doi.doi_val);
if (ret.cookie.cookie_len > 0) {
if (!cookie || !cookielen) {
- remoteError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("caller ignores cookie or cookielen"));
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("caller ignores cookie or cookielen"));
goto error;
}
*cookie = ret.cookie.cookie_val; /* Caller frees. */
}
if (ret.uri_out) {
if (!uri_out) {
- remoteError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("caller ignores uri_out"));
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("caller ignores uri_out"));
goto error;
}
*uri_out = *ret.uri_out; /* Caller frees. */
make_nonnull_domain (&args.dom, domain);
if (nr_stats > REMOTE_DOMAIN_MEMORY_STATS_MAX) {
- remoteError(VIR_ERR_RPC,
- _("too many memory stats requested: %d > %d"), nr_stats,
- REMOTE_DOMAIN_MEMORY_STATS_MAX);
+ virReportError(VIR_ERR_RPC,
+ _("too many memory stats requested: %d > %d"), nr_stats,
+ REMOTE_DOMAIN_MEMORY_STATS_MAX);
goto done;
}
args.maxStats = nr_stats;
remoteDriverLock(priv);
if (size > REMOTE_DOMAIN_BLOCK_PEEK_BUFFER_MAX) {
- remoteError(VIR_ERR_RPC,
- _("block peek request too large for remote protocol, %zi > %d"),
- size, REMOTE_DOMAIN_BLOCK_PEEK_BUFFER_MAX);
+ virReportError(VIR_ERR_RPC,
+ _("block peek request too large for remote protocol, %zi > %d"),
+ size, REMOTE_DOMAIN_BLOCK_PEEK_BUFFER_MAX);
goto done;
}
goto done;
if (ret.buffer.buffer_len != size) {
- remoteError(VIR_ERR_RPC, "%s",
- _("returned buffer is not same size as requested"));
+ virReportError(VIR_ERR_RPC, "%s",
+ _("returned buffer is not same size as requested"));
goto cleanup;
}
remoteDriverLock(priv);
if (size > REMOTE_DOMAIN_MEMORY_PEEK_BUFFER_MAX) {
- remoteError(VIR_ERR_RPC,
- _("memory peek request too large for remote protocol, %zi > %d"),
- size, REMOTE_DOMAIN_MEMORY_PEEK_BUFFER_MAX);
+ virReportError(VIR_ERR_RPC,
+ _("memory peek request too large for remote protocol, %zi > %d"),
+ size, REMOTE_DOMAIN_MEMORY_PEEK_BUFFER_MAX);
goto done;
}
goto done;
if (ret.buffer.buffer_len != size) {
- remoteError(VIR_ERR_RPC, "%s",
- _("returned buffer is not same size as requested"));
+ virReportError(VIR_ERR_RPC, "%s",
+ _("returned buffer is not same size as requested"));
goto cleanup;
}
remoteDriverLock(priv);
if (nparams > REMOTE_NODE_CPU_STATS_MAX) {
- remoteError(VIR_ERR_RPC,
- _("nparams count exceeds maximum: %u > %u"),
- nparams, REMOTE_NODE_CPU_STATS_MAX);
+ virReportError(VIR_ERR_RPC,
+ _("nparams count exceeds maximum: %u > %u"),
+ nparams, REMOTE_NODE_CPU_STATS_MAX);
goto done;
}
if (ncpus > REMOTE_DOMAIN_GET_CPU_STATS_NCPUS_MAX) {
- remoteError(VIR_ERR_RPC,
- _("ncpus count exceeds maximum: %u > %u"),
- ncpus, REMOTE_DOMAIN_GET_CPU_STATS_NCPUS_MAX);
+ virReportError(VIR_ERR_RPC,
+ _("ncpus count exceeds maximum: %u > %u"),
+ ncpus, REMOTE_DOMAIN_GET_CPU_STATS_NCPUS_MAX);
goto done;
}
if (ret.params.params_len > nparams * ncpus ||
(ret.params.params_len &&
((ret.params.params_len % ret.nparams) || ret.nparams > nparams))) {
- remoteError(VIR_ERR_RPC, "%s",
- _("remoteDomainGetCPUStats: "
- "returned number of stats exceeds limit"));
+ virReportError(VIR_ERR_RPC, "%s",
+ _("remoteDomainGetCPUStats: "
+ "returned number of stats exceeds limit"));
memset(params, 0, sizeof(*params) * nparams * ncpus);
goto cleanup;
}
} else if (STRCASEEQ(authtype, "polkit")) {
want = REMOTE_AUTH_POLKIT;
} else {
- remoteError(VIR_ERR_AUTH_FAILED,
- _("unknown authentication type %s"), authtype);
+ virReportError(VIR_ERR_AUTH_FAILED,
+ _("unknown authentication type %s"), authtype);
return -1;
}
for (i = 0 ; i < ret.types.types_len ; i++) {
type = want;
}
if (type == REMOTE_AUTH_NONE) {
- remoteError(VIR_ERR_AUTH_FAILED,
- _("requested authentication type %s rejected"),
- authtype);
+ virReportError(VIR_ERR_AUTH_FAILED,
+ _("requested authentication type %s rejected"),
+ authtype);
return -1;
}
} else {
break;
default:
- remoteError(VIR_ERR_AUTH_FAILED,
- _("unsupported authentication type %d"),
- ret.types.types_val[0]);
+ virReportError(VIR_ERR_AUTH_FAILED,
+ _("unsupported authentication type %d"),
+ ret.types.types_val[0]);
VIR_FREE(ret.types.types_val);
return -1;
}
goto cleanup;
if (remoteAuthMakeCredentials(state->interact, &state->cred, &state->ncred) < 0) {
- remoteError(VIR_ERR_AUTH_FAILED, "%s",
- _("Failed to make auth credentials"));
+ virReportError(VIR_ERR_AUTH_FAILED, "%s",
+ _("Failed to make auth credentials"));
goto cleanup;
}
/* Run the authentication callback */
if (!auth || !auth->cb) {
- remoteError(VIR_ERR_AUTH_FAILED, "%s",
- _("No authentication callback available"));
+ virReportError(VIR_ERR_AUTH_FAILED, "%s",
+ _("No authentication callback available"));
goto cleanup;
}
if ((*(auth->cb))(state->cred, state->ncred, auth->cbdata) < 0) {
- remoteError(VIR_ERR_AUTH_FAILED, "%s",
- _("Failed to collect auth credentials"));
+ virReportError(VIR_ERR_AUTH_FAILED, "%s",
+ _("Failed to collect auth credentials"));
goto cleanup;
}
mechlist = iret.mechlist;
if (wantmech) {
if (strstr(mechlist, wantmech) == NULL) {
- remoteError(VIR_ERR_AUTH_FAILED,
- _("SASL mechanism %s not supported by server"),
- wantmech);
+ virReportError(VIR_ERR_AUTH_FAILED,
+ _("SASL mechanism %s not supported by server"),
+ wantmech);
VIR_FREE(iret.mechlist);
goto cleanup;
}
VIR_FREE(iret.mechlist);
if (clientoutlen > REMOTE_AUTH_SASL_DATA_MAX) {
- remoteError(VIR_ERR_AUTH_FAILED,
- _("SASL negotiation data too long: %zu bytes"),
- clientoutlen);
+ virReportError(VIR_ERR_AUTH_FAILED,
+ _("SASL negotiation data too long: %zu bytes"),
+ clientoutlen);
goto cleanup;
}
/* NB, distinction of NULL vs "" is *critical* in SASL */
VIR_DEBUG("SASL SSF value %d", ssf);
if (ssf < 56) { /* 56 == DES level, good for Kerberos */
- remoteError(VIR_ERR_AUTH_FAILED,
- _("negotiation SSF %d was not strong enough"), ssf);
+ virReportError(VIR_ERR_AUTH_FAILED,
+ _("negotiation SSF %d was not strong enough"), ssf);
goto cleanup;
}
priv->is_secure = 1;
VIR_DEBUG("Client run callback for PolicyKit authentication");
/* Run the authentication callback */
if ((*(auth->cb))(&cred, 1, auth->cbdata) < 0) {
- remoteError(VIR_ERR_AUTH_FAILED, "%s",
- _("Failed to collect auth credentials"));
+ virReportError(VIR_ERR_AUTH_FAILED, "%s",
+ _("Failed to collect auth credentials"));
return -1;
}
} else {
if ((count = virDomainEventStateRegister(conn, priv->domainEventState,
callback, opaque, freecb)) < 0) {
- remoteError(VIR_ERR_RPC, "%s", _("adding cb to list"));
+ virReportError(VIR_ERR_RPC, "%s", _("adding cb to list"));
goto done;
}
/* internalFlags intentionally do not go over the wire */
if (internalFlags) {
- remoteError(VIR_ERR_INTERNAL_ERROR, "%s", _("no internalFlags support"));
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("no internalFlags support"));
goto done;
}
dom, eventID,
callback, opaque, freecb,
&callbackID)) < 0) {
- remoteError(VIR_ERR_RPC, "%s", _("adding cb to list"));
+ virReportError(VIR_ERR_RPC, "%s", _("adding cb to list"));
goto done;
}
if ((eventID = virDomainEventStateEventID(conn,
priv->domainEventState,
callbackID)) < 0) {
- remoteError(VIR_ERR_RPC, _("unable to find callback ID %d"), callbackID);
+ virReportError(VIR_ERR_RPC, _("unable to find callback ID %d"), callbackID);
goto done;
}
if ((count = virDomainEventStateDeregisterID(conn,
priv->domainEventState,
callbackID)) < 0) {
- remoteError(VIR_ERR_RPC, _("unable to find callback ID %d"), callbackID);
+ virReportError(VIR_ERR_RPC, _("unable to find callback ID %d"), callbackID);
goto done;
}
if (ret.cookie_out.cookie_out_len > 0) {
if (!cookieout || !cookieoutlen) {
- remoteError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("caller ignores cookieout or cookieoutlen"));
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("caller ignores cookieout or cookieoutlen"));
goto error;
}
*cookieout = ret.cookie_out.cookie_out_val; /* Caller frees. */
if (ret.cookie_out.cookie_out_len > 0) {
if (!cookieout || !cookieoutlen) {
- remoteError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("caller ignores cookieout or cookieoutlen"));
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("caller ignores cookieout or cookieoutlen"));
goto error;
}
*cookieout = ret.cookie_out.cookie_out_val; /* Caller frees. */
}
if (ret.uri_out) {
if (!uri_out) {
- remoteError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("caller ignores uri_out"));
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("caller ignores uri_out"));
goto error;
}
*uri_out = *ret.uri_out; /* Caller frees. */
if (ret.cookie_out.cookie_out_len > 0) {
if (!cookieout || !cookieoutlen) {
- remoteError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("caller ignores cookieout or cookieoutlen"));
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("caller ignores cookieout or cookieoutlen"));
goto error;
}
*cookieout = ret.cookie_out.cookie_out_val; /* Caller frees. */
if (ret.cookie_out.cookie_out_len > 0) {
if (!cookieout || !cookieoutlen) {
- remoteError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("caller ignores cookieout or cookieoutlen"));
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("caller ignores cookieout or cookieoutlen"));
goto error;
}
*cookieout = ret.cookie_out.cookie_out_val; /* Caller frees. */
if (ret.cookie_out.cookie_out_len > 0) {
if (!cookieout || !cookieoutlen) {
- remoteError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("caller ignores cookieout or cookieoutlen"));
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("caller ignores cookieout or cookieoutlen"));
goto error;
}
*cookieout = ret.cookie_out.cookie_out_val; /* Caller frees. */
remoteDriverLock(priv);
if (!virNetClientKeepAliveIsSupported(priv->client)) {
- remoteError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("the caller doesn't support keepalive protocol;"
- " perhaps it's missing event loop implementation"));
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("the caller doesn't support keepalive protocol;"
+ " perhaps it's missing event loop implementation"));
goto cleanup;
}