From 33deb0fe1a445d6fa3a85aa68088ce320ceee1f4 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sat, 2 Apr 2016 14:08:06 -0400 Subject: [PATCH] Allow ENet to directly use the resolved address rather than doing DNS resolution itself --- enet | 2 +- src/ControlStream.c | 5 +---- src/RtspConnection.c | 5 +---- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/enet b/enet index a602abf..2bc07bb 160000 --- a/enet +++ b/enet @@ -1 +1 @@ -Subproject commit a602abf244fb94272b2fa0977e6d4ad50df23500 +Subproject commit 2bc07bb50d3664b5bcd690ebdd519a3d5cae3e58 diff --git a/src/ControlStream.c b/src/ControlStream.c index c891caa..175037a 100644 --- a/src/ControlStream.c +++ b/src/ControlStream.c @@ -624,10 +624,7 @@ int startControlStream(void) { ENetAddress address; ENetEvent event; - // This will do DNS resolution if required - if (enet_address_set_host(&address, RemoteAddrString) < 0) { - return -1; - } + enet_address_set_address(&address, (struct sockaddr *)&RemoteAddr, RemoteAddrLen); enet_address_set_port(&address, 47999); // Create a client that can use 1 outgoing connection and 1 channel diff --git a/src/RtspConnection.c b/src/RtspConnection.c index 90eb624..2e5a2c1 100644 --- a/src/RtspConnection.c +++ b/src/RtspConnection.c @@ -472,10 +472,7 @@ int performRtspHandshake(void) { ENetAddress address; ENetEvent event; - // This will do DNS resolution if required - if (enet_address_set_host(&address, RemoteAddrString) < 0) { - return -1; - } + enet_address_set_address(&address, (struct sockaddr *)&RemoteAddr, RemoteAddrLen); enet_address_set_port(&address, 48010); // Create a client that can use 1 outgoing connection and 1 channel