[PATCH 6/7] Add SASL to virNetSocket{Local, Remote}AddrString

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Rename them to virNetSocket{Local,Remote}AddrStringSASL
to make their format more obvious.
---
 src/libvirt_remote.syms      |  4 ++--
 src/rpc/virnetclient.c       |  4 ++--
 src/rpc/virnetserverclient.c |  4 ++--
 src/rpc/virnetsocket.c       |  4 ++--
 src/rpc/virnetsocket.h       |  4 ++--
 tests/virnetsockettest.c     | 12 ++++++------
 6 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/src/libvirt_remote.syms b/src/libvirt_remote.syms
index fd80e46..3858f4d 100644
--- a/src/libvirt_remote.syms
+++ b/src/libvirt_remote.syms
@@ -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;
diff --git a/src/rpc/virnetclient.c b/src/rpc/virnetclient.c
index 9c0d190..c43cd08 100644
--- a/src/rpc/virnetclient.c
+++ b/src/rpc/virnetclient.c
@@ -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
diff --git a/src/rpc/virnetserverclient.c b/src/rpc/virnetserverclient.c
index 15715a9..5aa7634 100644
--- a/src/rpc/virnetserverclient.c
+++ b/src/rpc/virnetserverclient.c
@@ -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)
diff --git a/src/rpc/virnetsocket.c b/src/rpc/virnetsocket.c
index 00dc417..405f5ba 100644
--- a/src/rpc/virnetsocket.c
+++ b/src/rpc/virnetsocket.c
@@ -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;
 }
diff --git a/src/rpc/virnetsocket.h b/src/rpc/virnetsocket.h
index 25ca14e..ec064bb 100644
--- a/src/rpc/virnetsocket.h
+++ b/src/rpc/virnetsocket.h
@@ -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);
diff --git a/tests/virnetsockettest.c b/tests/virnetsockettest.c
index 4d78d27..cafdca9 100644
--- a/tests/virnetsockettest.c
+++ b/tests/virnetsockettest.c
@@ -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;
     }
-- 
2.7.3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]