remote: fix error reporting for invalid daemon mode

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrangé 2020-08-07 18:39:22 +01:00
parent f8ec7c842d
commit ceabe0f4cc

View File

@ -872,8 +872,11 @@ doRemoteOpen(virConnectPtr conn,
goto failed;
if (mode_str &&
(mode = remoteDriverModeTypeFromString(mode_str)) < 0)
(mode = remoteDriverModeTypeFromString(mode_str)) < 0) {
virReportError(VIR_ERR_INVALID_ARG,
_("Unknown remote mode '%s'"), mode_str);
goto failed;
}
if (conf && !proxy_str &&
virConfGetValueString(conf, "remote_proxy", &proxy_str) < 0)