From f82ddc4c78ed602ff2135a45804d8fb3415198a6 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 5 Apr 2016 17:15:07 -0700 Subject: Nailing down dependencies better --- src/core/lib/iomgr/unix_sockets_posix.c | 16 +--------------- src/core/lib/iomgr/unix_sockets_posix.h | 5 ----- src/core/lib/iomgr/unix_sockets_posix_noop.c | 9 --------- 3 files changed, 1 insertion(+), 29 deletions(-) (limited to 'src/core/lib/iomgr') diff --git a/src/core/lib/iomgr/unix_sockets_posix.c b/src/core/lib/iomgr/unix_sockets_posix.c index 42e44989e0..5767c852df 100644 --- a/src/core/lib/iomgr/unix_sockets_posix.c +++ b/src/core/lib/iomgr/unix_sockets_posix.c @@ -41,6 +41,7 @@ #include #include +#include void grpc_create_socketpair_if_unix(int sv[2]) { GPR_ASSERT(socketpair(AF_UNIX, SOCK_STREAM, 0, sv) == 0); @@ -75,21 +76,6 @@ void grpc_unlink_if_unix_domain_socket(const struct sockaddr *addr) { } } -int grpc_parse_unix(grpc_uri *uri, struct sockaddr_storage *addr, size_t *len) { - struct sockaddr_un *un = (struct sockaddr_un *)addr; - - un->sun_family = AF_UNIX; - strcpy(un->sun_path, uri->path); - *len = strlen(un->sun_path) + sizeof(un->sun_family) + 1; - - return 1; -} - -char *grpc_unix_get_default_authority(grpc_resolver_factory *factory, - grpc_uri *uri) { - return gpr_strdup("localhost"); -} - char *grpc_sockaddr_to_uri_unix_if_possible(const struct sockaddr *addr) { if (addr->sa_family != AF_UNIX) { return NULL; diff --git a/src/core/lib/iomgr/unix_sockets_posix.h b/src/core/lib/iomgr/unix_sockets_posix.h index f3ba050fbc..6758c498e5 100644 --- a/src/core/lib/iomgr/unix_sockets_posix.h +++ b/src/core/lib/iomgr/unix_sockets_posix.h @@ -49,11 +49,6 @@ int grpc_is_unix_socket(const struct sockaddr *addr); void grpc_unlink_if_unix_domain_socket(const struct sockaddr *addr); -int grpc_parse_unix(grpc_uri *uri, struct sockaddr_storage *addr, size_t *len); - -char *grpc_unix_get_default_authority(grpc_resolver_factory *factory, - grpc_uri *uri); - char *grpc_sockaddr_to_uri_unix_if_possible(const struct sockaddr *addr); #endif /* GRPC_CORE_LIB_IOMGR_UNIX_SOCKETS_POSIX_H */ diff --git a/src/core/lib/iomgr/unix_sockets_posix_noop.c b/src/core/lib/iomgr/unix_sockets_posix_noop.c index 43e006e15e..4134870b80 100644 --- a/src/core/lib/iomgr/unix_sockets_posix_noop.c +++ b/src/core/lib/iomgr/unix_sockets_posix_noop.c @@ -50,15 +50,6 @@ int grpc_is_unix_socket(const struct sockaddr *addr) { return false; } void grpc_unlink_if_unix_domain_socket(const struct sockaddr *addr) {} -int grpc_parse_unix(grpc_uri *uri, struct sockaddr_storage *addr, size_t *len) { - return 0; -} - -char *grpc_unix_get_default_authority(grpc_resolver_factory *factory, - grpc_uri *uri) { - return NULL; -} - char *grpc_sockaddr_to_uri_unix_if_possible(const struct sockaddr *addr) { return NULL; } -- cgit v1.2.3