aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/iomgr
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-04-05 17:15:07 -0700
committerGravatar Craig Tiller <ctiller@google.com>2016-04-05 17:15:07 -0700
commitf82ddc4c78ed602ff2135a45804d8fb3415198a6 (patch)
tree08d353378e6332f2ebd5499ce830ab90d44d2952 /src/core/lib/iomgr
parent859fb06e80d63255ba614ad8c7fc91df50bd101b (diff)
Nailing down dependencies better
Diffstat (limited to 'src/core/lib/iomgr')
-rw-r--r--src/core/lib/iomgr/unix_sockets_posix.c16
-rw-r--r--src/core/lib/iomgr/unix_sockets_posix.h5
-rw-r--r--src/core/lib/iomgr/unix_sockets_posix_noop.c9
3 files changed, 1 insertions, 29 deletions
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 <sys/un.h>
#include <grpc/support/alloc.h>
+#include <grpc/support/log.h>
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;
}