aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib
diff options
context:
space:
mode:
authorGravatar murgatroid99 <mlumish@google.com>2017-01-31 10:51:06 -0800
committerGravatar murgatroid99 <mlumish@google.com>2017-01-31 10:51:06 -0800
commitc4ed3b91daee0409734291fe87676358e49621e5 (patch)
tree6d8131171adfa8f448706f205559dbda9c391b0b /src/core/lib
parentc73089643ee496746dcf684611c07ea3f91eb845 (diff)
Fix bugs in UV DNS resolver implementation
Diffstat (limited to 'src/core/lib')
-rw-r--r--src/core/lib/iomgr/resolve_address_uv.c5
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);