mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-04 16:03:49 +00:00
libxl: don't overwrite error from virNetSocketNewConnectTCP()
Remove redundant error reporting in libxlDomainMigrationPerform(). virNetSocketNewConnectTCP() is perfectly capable of reporting sensible errors.
This commit is contained in:
parent
e92e5ba128
commit
6ce939c247
@ -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,
|
|||||||
/* 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);
|
||||||
|
Loading…
Reference in New Issue
Block a user