From dd92a0a8122591ca3568e5b99d4bbfcb4a90013d Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Thu, 13 Oct 2016 16:51:46 -0700 Subject: [PATCH] Remove socket_loopback_client. Bug: http://b/31537253 Test: builds Change-Id: If02c8107206fb60e4622f8937bee0d0a362e1c7d --- include/cutils/sockets.h | 1 - libcutils/Android.bp | 1 - libcutils/socket_loopback_client_unix.c | 40 ------------------------- 3 files changed, 42 deletions(-) delete mode 100644 libcutils/socket_loopback_client_unix.c diff --git a/include/cutils/sockets.h b/include/cutils/sockets.h index a93c8eaa4..1f7eedde8 100644 --- a/include/cutils/sockets.h +++ b/include/cutils/sockets.h @@ -84,7 +84,6 @@ int android_get_control_socket(const char* name); * * These functions return INVALID_SOCKET (-1) on failure for all platforms. */ -int socket_loopback_client(int port, int type); cutils_socket_t socket_network_client(const char* host, int port, int type); int socket_network_client_timeout(const char* host, int port, int type, int timeout, int* getaddrinfo_error); diff --git a/libcutils/Android.bp b/libcutils/Android.bp index 955c0ecd6..2e7c8fc25 100644 --- a/libcutils/Android.bp +++ b/libcutils/Android.bp @@ -23,7 +23,6 @@ libcutils_nonwindows_sources = [ "socket_inaddr_any_server_unix.c", "socket_local_client_unix.c", "socket_local_server_unix.c", - "socket_loopback_client_unix.c", "socket_loopback_server_unix.c", "socket_network_client_unix.c", "sockets_unix.cpp", diff --git a/libcutils/socket_loopback_client_unix.c b/libcutils/socket_loopback_client_unix.c deleted file mode 100644 index 137e369c2..000000000 --- a/libcutils/socket_loopback_client_unix.c +++ /dev/null @@ -1,40 +0,0 @@ -/* -** Copyright 2006, The Android Open Source Project -** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at -** -** http://www.apache.org/licenses/LICENSE-2.0 -** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and -** limitations under the License. -*/ - -#include -#include -#include -#include -#include - -#if !defined(_WIN32) -#include -#include -#include -#include -#endif - -#include - -/* Connect to port on the loopback IP interface. type is - * SOCK_STREAM or SOCK_DGRAM. - * return is a file descriptor or -1 on error - */ -int socket_loopback_client(int port, int type) -{ - return socket_network_client("localhost", port, type); -} -