From: Osier Yang Date: Thu, 1 Sep 2011 07:15:17 +0000 (+0800) Subject: remote: Fix incorrect error codes X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=fd038a337bb370c545ba0d7319611cfc4f8c1731;p=libvirt.git remote: Fix incorrect error codes Introduced by d4b53ef6c. For "no internalFlags support", the error code is changed into INTERNAL_ERROR. --- diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index 603d589d58..79fcac01f3 100644 --- a/src/remote/remote_driver.c +++ b/src/remote/remote_driver.c @@ -2936,7 +2936,7 @@ static int remoteDomainEventRegister(virConnectPtr conn, remoteDriverLock(priv); if (priv->domainEventState->timer < 0) { - remoteError(VIR_ERR_OPERATION_INVALID, "%s", _("no event support")); + remoteError(VIR_ERR_NO_SUPPORT, "%s", _("no event support")); goto done; } @@ -3285,7 +3285,7 @@ remoteSecretGetValue (virSecretPtr secret, size_t *value_size, /* internalFlags intentionally do not go over the wire */ if (internalFlags) { - remoteError(VIR_ERR_OPERATION_INVALID, "%s", _("no internalFlags support")); + remoteError(VIR_ERR_INTERNAL_ERROR, "%s", _("no internalFlags support")); goto done; } @@ -3549,7 +3549,7 @@ static int remoteDomainEventRegisterAny(virConnectPtr conn, remoteDriverLock(priv); if (priv->domainEventState->timer < 0) { - remoteError(VIR_ERR_OPERATION_INVALID, "%s", _("no event support")); + remoteError(VIR_ERR_NO_SUPPORT, "%s", _("no event support")); goto done; }