mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-09 01:18:00 +03:00
Add SASL to virNetSocket{Local,Remote}AddrString
Rename them to virNetSocket{Local,Remote}AddrStringSASL to make their format more obvious.
This commit is contained in:
parent
dbce70b243
commit
ea537e7b36
@ -212,7 +212,7 @@ virNetSocketHasPassFD;
|
||||
virNetSocketHasPendingData;
|
||||
virNetSocketIsLocal;
|
||||
virNetSocketListen;
|
||||
virNetSocketLocalAddrString;
|
||||
virNetSocketLocalAddrStringSASL;
|
||||
virNetSocketNewConnectCommand;
|
||||
virNetSocketNewConnectExternal;
|
||||
virNetSocketNewConnectLibSSH2;
|
||||
@ -227,7 +227,7 @@ virNetSocketNewPostExecRestart;
|
||||
virNetSocketPreExecRestart;
|
||||
virNetSocketRead;
|
||||
virNetSocketRecvFD;
|
||||
virNetSocketRemoteAddrString;
|
||||
virNetSocketRemoteAddrStringSASL;
|
||||
virNetSocketRemoteAddrStringURI;
|
||||
virNetSocketRemoveIOCallback;
|
||||
virNetSocketSendFD;
|
||||
|
@ -946,12 +946,12 @@ void virNetClientRemoveStream(virNetClientPtr client,
|
||||
|
||||
const char *virNetClientLocalAddrString(virNetClientPtr client)
|
||||
{
|
||||
return virNetSocketLocalAddrString(client->sock);
|
||||
return virNetSocketLocalAddrStringSASL(client->sock);
|
||||
}
|
||||
|
||||
const char *virNetClientRemoteAddrString(virNetClientPtr client)
|
||||
{
|
||||
return virNetSocketRemoteAddrString(client->sock);
|
||||
return virNetSocketRemoteAddrStringSASL(client->sock);
|
||||
}
|
||||
|
||||
#if WITH_GNUTLS
|
||||
|
@ -907,7 +907,7 @@ const char *virNetServerClientLocalAddrString(virNetServerClientPtr client)
|
||||
{
|
||||
if (!client->sock)
|
||||
return NULL;
|
||||
return virNetSocketLocalAddrString(client->sock);
|
||||
return virNetSocketLocalAddrStringSASL(client->sock);
|
||||
}
|
||||
|
||||
|
||||
@ -915,7 +915,7 @@ const char *virNetServerClientRemoteAddrString(virNetServerClientPtr client)
|
||||
{
|
||||
if (!client->sock)
|
||||
return NULL;
|
||||
return virNetSocketRemoteAddrString(client->sock);
|
||||
return virNetSocketRemoteAddrStringSASL(client->sock);
|
||||
}
|
||||
|
||||
const char *virNetServerClientRemoteAddrStringURI(virNetServerClientPtr client)
|
||||
|
@ -1461,12 +1461,12 @@ int virNetSocketSetBlocking(virNetSocketPtr sock,
|
||||
}
|
||||
|
||||
|
||||
const char *virNetSocketLocalAddrString(virNetSocketPtr sock)
|
||||
const char *virNetSocketLocalAddrStringSASL(virNetSocketPtr sock)
|
||||
{
|
||||
return sock->localAddrStrSASL;
|
||||
}
|
||||
|
||||
const char *virNetSocketRemoteAddrString(virNetSocketPtr sock)
|
||||
const char *virNetSocketRemoteAddrStringSASL(virNetSocketPtr sock)
|
||||
{
|
||||
return sock->remoteAddrStrSASL;
|
||||
}
|
||||
|
@ -148,8 +148,8 @@ void virNetSocketSetSASLSession(virNetSocketPtr sock,
|
||||
bool virNetSocketHasCachedData(virNetSocketPtr sock);
|
||||
bool virNetSocketHasPendingData(virNetSocketPtr sock);
|
||||
|
||||
const char *virNetSocketLocalAddrString(virNetSocketPtr sock);
|
||||
const char *virNetSocketRemoteAddrString(virNetSocketPtr sock);
|
||||
const char *virNetSocketLocalAddrStringSASL(virNetSocketPtr sock);
|
||||
const char *virNetSocketRemoteAddrStringSASL(virNetSocketPtr sock);
|
||||
const char *virNetSocketRemoteAddrStringURI(virNetSocketPtr sock);
|
||||
|
||||
int virNetSocketListen(virNetSocketPtr sock, int backlog);
|
||||
|
@ -249,12 +249,12 @@ static int testSocketUNIXAddrs(const void *data ATTRIBUTE_UNUSED)
|
||||
if (virNetSocketNewListenUNIX(path, 0700, -1, getegid(), &lsock) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (STRNEQ(virNetSocketLocalAddrString(lsock), "127.0.0.1;0")) {
|
||||
if (STRNEQ(virNetSocketLocalAddrStringSASL(lsock), "127.0.0.1;0")) {
|
||||
VIR_DEBUG("Unexpected local address");
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (virNetSocketRemoteAddrString(lsock) != NULL) {
|
||||
if (virNetSocketRemoteAddrStringSASL(lsock) != NULL) {
|
||||
VIR_DEBUG("Unexpected remote address");
|
||||
goto cleanup;
|
||||
}
|
||||
@ -265,12 +265,12 @@ static int testSocketUNIXAddrs(const void *data ATTRIBUTE_UNUSED)
|
||||
if (virNetSocketNewConnectUNIX(path, false, NULL, &csock) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (STRNEQ(virNetSocketLocalAddrString(csock), "127.0.0.1;0")) {
|
||||
if (STRNEQ(virNetSocketLocalAddrStringSASL(csock), "127.0.0.1;0")) {
|
||||
VIR_DEBUG("Unexpected local address");
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (STRNEQ(virNetSocketRemoteAddrString(csock), "127.0.0.1;0")) {
|
||||
if (STRNEQ(virNetSocketRemoteAddrStringSASL(csock), "127.0.0.1;0")) {
|
||||
VIR_DEBUG("Unexpected remote address");
|
||||
goto cleanup;
|
||||
}
|
||||
@ -287,12 +287,12 @@ static int testSocketUNIXAddrs(const void *data ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
|
||||
if (STRNEQ(virNetSocketLocalAddrString(ssock), "127.0.0.1;0")) {
|
||||
if (STRNEQ(virNetSocketLocalAddrStringSASL(ssock), "127.0.0.1;0")) {
|
||||
VIR_DEBUG("Unexpected local address");
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (STRNEQ(virNetSocketRemoteAddrString(ssock), "127.0.0.1;0")) {
|
||||
if (STRNEQ(virNetSocketRemoteAddrStringSASL(ssock), "127.0.0.1;0")) {
|
||||
VIR_DEBUG("Unexpected remote address");
|
||||
goto cleanup;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user