qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH v2 3/7] net: enlarge connect_to_addr() scope


From: Liu Yuan
Subject: [Qemu-devel] [PATCH v2 3/7] net: enlarge connect_to_addr() scope
Date: Fri, 29 Mar 2013 13:42:20 +0800

From: Liu Yuan <address@hidden>

This is a prepare patch.

Signed-off-by: Liu Yuan <address@hidden>
---
 include/net.h        |    8 ++++++++
 sheep/sockfd_cache.c |    8 --------
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/include/net.h b/include/net.h
index a68c880..75ac197 100644
--- a/include/net.h
+++ b/include/net.h
@@ -72,4 +72,12 @@ int set_rcv_timeout(int fd);
 int get_local_addr(uint8_t *bytes);
 bool inetaddr_is_valid(char *addr);
 
+static inline int connect_to_addr(const uint8_t *addr, int port)
+{
+       char name[INET6_ADDRSTRLEN];
+
+       addr_to_str(name, sizeof(name), addr, 0);
+       return connect_to(name, port);
+}
+
 #endif
diff --git a/sheep/sockfd_cache.c b/sheep/sockfd_cache.c
index ddefbf2..1e0d6cf 100644
--- a/sheep/sockfd_cache.c
+++ b/sheep/sockfd_cache.c
@@ -337,14 +337,6 @@ static inline void check_idx(int idx)
        queue_work(sys->sockfd_wqueue, w);
 }
 
-static inline int connect_to_addr(const uint8_t *addr, int port)
-{
-       char name[INET6_ADDRSTRLEN];
-
-       addr_to_str(name, sizeof(name), addr, 0);
-       return connect_to(name, port);
-}
-
 /* Add the node back if it is still alive */
 static inline int revalidate_node(const struct node_id *nid)
 {
-- 
1.7.9.5




reply via email to

[Prev in Thread] Current Thread [Next in Thread]