mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
Revert "virnetsocket: Provide socket address format in a more standard form"
This partially reverts commit 9b45c9f049.
It changed the default format of socket address from the one SASL
requires, but did not adjust all the callers.
It also removed the test coverage for it.
Revert most of the changes except the virSocketAddrFormatFull support
for URI-formatted strings.
This fixes https://bugzilla.redhat.com/show_bug.cgi?id=1345743 while
reverting the format used by virt-admin's client-info command from
the URI one to the SASL one.
https://bugzilla.redhat.com/show_bug.cgi?id=1345743
This commit is contained in:
@@ -262,11 +262,11 @@ static virNetSocketPtr virNetSocketNew(virSocketAddrPtr localAddr,
|
||||
|
||||
|
||||
if (localAddr &&
|
||||
!(sock->localAddrStr = virSocketAddrFormatFull(localAddr, true, NULL)))
|
||||
!(sock->localAddrStr = virSocketAddrFormatFull(localAddr, true, ";")))
|
||||
goto error;
|
||||
|
||||
if (remoteAddr &&
|
||||
!(sock->remoteAddrStr = virSocketAddrFormatFull(remoteAddr, true, NULL)))
|
||||
!(sock->remoteAddrStr = virSocketAddrFormatFull(remoteAddr, true, ";")))
|
||||
goto error;
|
||||
|
||||
sock->client = isClient;
|
||||
@@ -1465,19 +1465,6 @@ const char *virNetSocketRemoteAddrString(virNetSocketPtr sock)
|
||||
return sock->remoteAddrStr;
|
||||
}
|
||||
|
||||
/* These helper functions return a SASL-formatted socket addr string,
|
||||
* caller is responsible for freeing the string.
|
||||
*/
|
||||
char *virNetSocketLocalAddrFormatSASL(virNetSocketPtr sock)
|
||||
{
|
||||
return virSocketAddrFormatFull(&sock->localAddr, true, ";");
|
||||
}
|
||||
|
||||
char *virNetSocketRemoteAddrFormatSASL(virNetSocketPtr sock)
|
||||
{
|
||||
return virSocketAddrFormatFull(&sock->remoteAddr, true, ";");
|
||||
}
|
||||
|
||||
|
||||
#if WITH_GNUTLS
|
||||
static ssize_t virNetSocketTLSSessionWrite(const char *buf,
|
||||
|
||||
Reference in New Issue
Block a user