提交 0206984a 编写于 作者: J Jim Fehlig 提交者: Cole Robinson

libxl: don't overwrite error from virNetSocketNewConnectTCP()

Remove redundant error reporting in libxlDomainMigrationPerform().
virNetSocketNewConnectTCP() is perfectly capable of reporting
sensible errors.

(cherry picked from commit 6ce939c2)
上级 999a873d
...@@ -472,7 +472,6 @@ libxlDomainMigrationPerform(libxlDriverPrivatePtr driver, ...@@ -472,7 +472,6 @@ libxlDomainMigrationPerform(libxlDriverPrivatePtr driver,
virURIPtr uri = NULL; virURIPtr uri = NULL;
virNetSocketPtr sock; virNetSocketPtr sock;
int sockfd = -1; int sockfd = -1;
int saved_errno = EINVAL;
int ret = -1; int ret = -1;
/* parse dst host:port from uri */ /* parse dst host:port from uri */
...@@ -487,12 +486,8 @@ libxlDomainMigrationPerform(libxlDriverPrivatePtr driver, ...@@ -487,12 +486,8 @@ libxlDomainMigrationPerform(libxlDriverPrivatePtr driver,
/* socket connect to dst host:port */ /* socket connect to dst host:port */
if (virNetSocketNewConnectTCP(hostname, portstr, if (virNetSocketNewConnectTCP(hostname, portstr,
AF_UNSPEC, AF_UNSPEC,
&sock) < 0) { &sock) < 0)
virReportSystemError(saved_errno,
_("unable to connect to '%s:%s'"),
hostname, portstr);
goto cleanup; goto cleanup;
}
if (virNetSocketSetBlocking(sock, true) < 0) { if (virNetSocketSetBlocking(sock, true) < 0) {
virObjectUnref(sock); virObjectUnref(sock);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册