diff options
author | murgatroid99 <mlumish@google.com> | 2017-01-31 10:51:06 -0800 |
---|---|---|
committer | murgatroid99 <mlumish@google.com> | 2017-01-31 10:51:06 -0800 |
commit | c4ed3b91daee0409734291fe87676358e49621e5 (patch) | |
tree | 6d8131171adfa8f448706f205559dbda9c391b0b /src/core/lib | |
parent | c73089643ee496746dcf684611c07ea3f91eb845 (diff) |
Fix bugs in UV DNS resolver implementation
Diffstat (limited to 'src/core/lib')
-rw-r--r-- | src/core/lib/iomgr/resolve_address_uv.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/lib/iomgr/resolve_address_uv.c b/src/core/lib/iomgr/resolve_address_uv.c index 9b5f3209f0..79ff910738 100644 --- a/src/core/lib/iomgr/resolve_address_uv.c +++ b/src/core/lib/iomgr/resolve_address_uv.c @@ -113,14 +113,15 @@ static grpc_error *try_split_host_port(const char *name, /* parse name, splitting it into host and port parts */ grpc_error *error; gpr_split_host_port(name, host, port); - if (host == NULL) { + if (*host == NULL) { char *msg; gpr_asprintf(&msg, "unparseable host:port: '%s'", name); error = GRPC_ERROR_CREATE(msg); gpr_free(msg); return error; } - if (port == NULL) { + if (*port == NULL) { + // TODO(murgatroid99): add tests for this case if (default_port == NULL) { char *msg; gpr_asprintf(&msg, "no port in name '%s'", name); |