aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/ext/resolver
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/ext/resolver')
-rw-r--r--src/core/ext/resolver/sockaddr/sockaddr_resolver.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/core/ext/resolver/sockaddr/sockaddr_resolver.c b/src/core/ext/resolver/sockaddr/sockaddr_resolver.c
index f232e0460b..17fd05f550 100644
--- a/src/core/ext/resolver/sockaddr/sockaddr_resolver.c
+++ b/src/core/ext/resolver/sockaddr/sockaddr_resolver.c
@@ -154,7 +154,7 @@ static char *ipv6_get_default_authority(grpc_resolver_factory *factory,
return ip_get_default_authority(uri);
}
-#ifdef GPR_HAVE_UNIX_SOCKET
+#ifdef GRPC_HAVE_UNIX_SOCKET
char *unix_get_default_authority(grpc_resolver_factory *factory,
grpc_uri *uri) {
return gpr_strdup("localhost");
@@ -163,9 +163,10 @@ char *unix_get_default_authority(grpc_resolver_factory *factory,
static void do_nothing(void *ignored) {}
-static grpc_resolver *sockaddr_create(
- grpc_resolver_args *args, const char *default_lb_policy_name,
- int parse(grpc_uri *uri, struct sockaddr_storage *dst, size_t *len)) {
+static grpc_resolver *sockaddr_create(grpc_resolver_args *args,
+ const char *default_lb_policy_name,
+ int parse(grpc_uri *uri,
+ grpc_resolved_address *dst)) {
bool errors_found = false;
sockaddr_resolver *r;
gpr_slice path_slice;
@@ -212,10 +213,8 @@ static grpc_resolver *sockaddr_create(
grpc_uri ith_uri = *args->uri;
char *part_str = gpr_dump_slice(path_parts.slices[i], GPR_DUMP_ASCII);
ith_uri.path = part_str;
- if (!parse(&ith_uri, (struct sockaddr_storage *)(&r->addresses->addresses[i]
- .address.addr),
- &r->addresses->addresses[i].address.len)) {
- errors_found = true;
+ if (!parse(&ith_uri, &r->addresses->addresses[i].address)) {
+ errors_found = true; /* GPR_TRUE */
}
gpr_free(part_str);
r->addresses->addresses[i].is_balancer = lb_enabled;
@@ -259,7 +258,7 @@ static void sockaddr_factory_unref(grpc_resolver_factory *factory) {}
static grpc_resolver_factory name##_resolver_factory = { \
&name##_factory_vtable}
-#ifdef GPR_HAVE_UNIX_SOCKET
+#ifdef GRPC_HAVE_UNIX_SOCKET
DECL_FACTORY(unix);
#endif
DECL_FACTORY(ipv4);
@@ -268,7 +267,7 @@ DECL_FACTORY(ipv6);
void grpc_resolver_sockaddr_init(void) {
grpc_register_resolver_type(&ipv4_resolver_factory);
grpc_register_resolver_type(&ipv6_resolver_factory);
-#ifdef GPR_HAVE_UNIX_SOCKET
+#ifdef GRPC_HAVE_UNIX_SOCKET
grpc_register_resolver_type(&unix_resolver_factory);
#endif
}