[vlc-commits] tcp: de-inline net_ConnectTCP()

Rémi Denis-Courmont git at videolan.org
Sun Nov 11 16:33:22 CET 2018


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Nov  9 22:58:36 2018 +0200| [e9c35689ae0405d87e0a0d7066627c216808ccd4] | committer: Rémi Denis-Courmont

tcp: de-inline net_ConnectTCP()

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e9c35689ae0405d87e0a0d7066627c216808ccd4
---

 include/vlc_network.h | 5 +----
 src/libvlccore.sym    | 1 +
 src/network/tcp.c     | 5 +++++
 3 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/include/vlc_network.h b/include/vlc_network.h
index 9c77b7b168..529bee3f04 100644
--- a/include/vlc_network.h
+++ b/include/vlc_network.h
@@ -129,10 +129,7 @@ VLC_API int * net_Listen(vlc_object_t *p_this, const char *psz_host, unsigned i_
 #define net_ListenTCP(a, b, c) net_Listen(VLC_OBJECT(a), b, c, \
                                           SOCK_STREAM, IPPROTO_TCP)
 
-static inline int net_ConnectTCP (vlc_object_t *obj, const char *host, int port)
-{
-    return net_Connect (obj, host, port, SOCK_STREAM, IPPROTO_TCP);
-}
+VLC_API int net_ConnectTCP (vlc_object_t *obj, const char *host, int port);
 #define net_ConnectTCP(a, b, c) net_ConnectTCP(VLC_OBJECT(a), b, c)
 
 VLC_API int net_AcceptSingle(vlc_object_t *obj, int lfd);
diff --git a/src/libvlccore.sym b/src/libvlccore.sym
index 6dae6fc5cb..5eceab3934 100644
--- a/src/libvlccore.sym
+++ b/src/libvlccore.sym
@@ -285,6 +285,7 @@ net_Accept
 net_AcceptSingle
 net_Connect
 net_ConnectDgram
+net_ConnectTCP
 net_Gets
 net_Listen
 net_ListenClose
diff --git a/src/network/tcp.c b/src/network/tcp.c
index 9f4360d245..abfa34302b 100644
--- a/src/network/tcp.c
+++ b/src/network/tcp.c
@@ -515,6 +515,11 @@ static int SocksHandshakeTCP( vlc_object_t *p_obj,
     return VLC_SUCCESS;
 }
 
+int (net_ConnectTCP)(vlc_object_t *obj, const char *host, int serv)
+{
+    return net_Connect(obj, host, serv, SOCK_STREAM, IPPROTO_TCP);
+}
+
 void net_ListenClose( int *pi_fd )
 {
     if( pi_fd != NULL )



More information about the vlc-commits mailing list