提交 f3b860e8 编写于 作者: D Daniel P. Berrange

remote: convert to typesafe virConf accessors

Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
上级 544f087e
...@@ -864,18 +864,9 @@ doRemoteOpen(virConnectPtr conn, ...@@ -864,18 +864,9 @@ doRemoteOpen(virConnectPtr conn,
/* Connect to the remote service. */ /* Connect to the remote service. */
switch (transport) { switch (transport) {
case trans_tls: case trans_tls:
if (conf && !tls_priority) { if (conf && !tls_priority &&
virConfValuePtr val = virConfGetValue(conf, "tls_priority"); virConfGetValueString(conf, "tls_priority", &tls_priority) < 0)
if (val) { goto failed;
if (val->type != VIR_CONF_STRING) {
virReportError(VIR_ERR_INVALID_ARG, "%s",
_("Config file 'tls_priority' must be a string"));
goto failed;
}
if (VIR_STRDUP(tls_priority, val->str) < 0)
goto failed;
}
}
#ifdef WITH_GNUTLS #ifdef WITH_GNUTLS
priv->tls = virNetTLSContextNewClientPath(pkipath, priv->tls = virNetTLSContextNewClientPath(pkipath,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册