{"action":"created","comment":{"url":"https://api.github.com/repos/grpc/grpc/pulls/comments/81005152","pull_request_review_id":2016976,"id":81005152,"diff_hunk":"@@ -50,9 +67,19 @@ static void test_succeeds(grpc_resolver_factory *factory, const char *string) {\n   args.uri = uri;\n   resolver = grpc_resolver_factory_create_resolver(factory, &args);\n   GPR_ASSERT(resolver != NULL);\n+\n+  on_resolution_arg on_res_arg;\n+  memset(&on_res_arg, 0, sizeof(on_res_arg));\n+  on_res_arg.expected_server_name = gpr_strdup(uri->path);","path":"test/core/client_config/resolvers/sockaddr_resolver_test.c","position":36,"original_position":36,"commit_id":"5f2e90e3aeb39c53f9b4e71cbf1af0f28f78d46a","original_commit_id":"5f2e90e3aeb39c53f9b4e71cbf1af0f28f78d46a","user":{"login":"markdroth","id":18664614,"avatar_url":"https://avatars.githubusercontent.com/u/18664614?v=3","gravatar_id":"","url":"https://api.github.com/users/markdroth","html_url":"https://github.com/markdroth","followers_url":"https://api.github.com/users/markdroth/followers","following_url":"https://api.github.com/users/markdroth/following{/other_user}","gists_url":"https://api.github.com/users/markdroth/gists{/gist_id}","starred_url":"https://api.github.com/users/markdroth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markdroth/subscriptions","organizations_url":"https://api.github.com/users/markdroth/orgs","repos_url":"https://api.github.com/users/markdroth/repos","events_url":"https://api.github.com/users/markdroth/events{/privacy}","received_events_url":"https://api.github.com/users/markdroth/received_events","type":"User","site_admin":false},"body":"I think you could avoid copying this string (and freeing it below).  Since `uri` is still in-scope until after this test finishes, it should be fine to use it directly.","created_at":"2016-09-28T20:05:42Z","updated_at":"2016-09-28T20:06:54Z","html_url":"https://github.com/grpc/grpc/pull/8226#discussion_r81005152","pull_request_url":"https://api.github.com/repos/grpc/grpc/pulls/8226","_links":{"self":{"href":"https://api.github.com/repos/grpc/grpc/pulls/comments/81005152"},"html":{"href":"https://github.com/grpc/grpc/pull/8226#discussion_r81005152"},"pull_request":{"href":"https://api.github.com/repos/grpc/grpc/pulls/8226"}}},"pull_request":{"url":"https://api.github.com/repos/grpc/grpc/pulls/8226","id":87040712,"html_url":"https://github.com/grpc/grpc/pull/8226","diff_url":"https://github.com/grpc/grpc/pull/8226.diff","patch_url":"https://github.com/grpc/grpc/pull/8226.patch","issue_url":"https://api.github.com/repos/grpc/grpc/issues/8226","number":8226,"state":"open","locked":false,"title":"Populate server_name for sockaddr resolver","user":{"login":"dgquintas","id":120217,"avatar_url":"https://avatars.githubusercontent.com/u/120217?v=3","gravatar_id":"","url":"https://api.github.com/users/dgquintas","html_url":"https://github.com/dgquintas","followers_url":"https://api.github.com/users/dgquintas/followers","following_url":"https://api.github.com/users/dgquintas/following{/other_user}","gists_url":"https://api.github.com/users/dgquintas/gists{/gist_id}","starred_url":"https://api.github.com/users/dgquintas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgquintas/subscriptions","organizations_url":"https://api.github.com/users/dgquintas/orgs","repos_url":"https://api.github.com/users/dgquintas/repos","events_url":"https://api.github.com/users/dgquintas/events{/privacy}","received_events_url":"https://api.github.com/users/dgquintas/received_events","type":"User","site_admin":false},"body":"Simply use the path of the uri given to the resolver upon creation. This change is mainly motivated by the use of the sockaddr resolver in the grpclb tests.","created_at":"2016-09-28T01:29:21Z","updated_at":"2016-09-28T20:06:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7761b0cc52c4cc9742bb9baf3308b737506bd457","assignee":{"login":"markdroth","id":18664614,"avatar_url":"https://avatars.githubusercontent.com/u/18664614?v=3","gravatar_id":"","url":"https://api.github.com/users/markdroth","html_url":"https://github.com/markdroth","followers_url":"https://api.github.com/users/markdroth/followers","following_url":"https://api.github.com/users/markdroth/following{/other_user}","gists_url":"https://api.github.com/users/markdroth/gists{/gist_id}","starred_url":"https://api.github.com/users/markdroth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markdroth/subscriptions","organizations_url":"https://api.github.com/users/markdroth/orgs","repos_url":"https://api.github.com/users/markdroth/repos","events_url":"https://api.github.com/users/markdroth/events{/privacy}","received_events_url":"https://api.github.com/users/markdroth/received_events","type":"User","site_admin":false},"assignees":[{"login":"markdroth","id":18664614,"avatar_url":"https://avatars.githubusercontent.com/u/18664614?v=3","gravatar_id":"","url":"https://api.github.com/users/markdroth","html_url":"https://github.com/markdroth","followers_url":"https://api.github.com/users/markdroth/followers","following_url":"https://api.github.com/users/markdroth/following{/other_user}","gists_url":"https://api.github.com/users/markdroth/gists{/gist_id}","starred_url":"https://api.github.com/users/markdroth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markdroth/subscriptions","organizations_url":"https://api.github.com/users/markdroth/orgs","repos_url":"https://api.github.com/users/markdroth/repos","events_url":"https://api.github.com/users/markdroth/events{/privacy}","received_events_url":"https://api.github.com/users/markdroth/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/grpc/grpc/pulls/8226/commits","review_comments_url":"https://api.github.com/repos/grpc/grpc/pulls/8226/comments","review_comment_url":"https://api.github.com/repos/grpc/grpc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/grpc/grpc/issues/8226/comments","statuses_url":"https://api.github.com/repos/grpc/grpc/statuses/5f2e90e3aeb39c53f9b4e71cbf1af0f28f78d46a","head":{"label":"dgquintas:sockaddr_server_name","ref":"sockaddr_server_name","sha":"5f2e90e3aeb39c53f9b4e71cbf1af0f28f78d46a","user":{"login":"dgquintas","id":120217,"avatar_url":"https://avatars.githubusercontent.com/u/120217?v=3","gravatar_id":"","url":"https://api.github.com/users/dgquintas","html_url":"https://github.com/dgquintas","followers_url":"https://api.github.com/users/dgquintas/followers","following_url":"https://api.github.com/users/dgquintas/following{/other_user}","gists_url":"https://api.github.com/users/dgquintas/gists{/gist_id}","starred_url":"https://api.github.com/users/dgquintas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgquintas/subscriptions","organizations_url":"https://api.github.com/users/dgquintas/orgs","repos_url":"https://api.github.com/users/dgquintas/repos","events_url":"https://api.github.com/users/dgquintas/events{/privacy}","received_events_url":"https://api.github.com/users/dgquintas/received_events","type":"User","site_admin":false},"repo":{"id":34546298,"name":"grpc","full_name":"dgquintas/grpc","owner":{"login":"dgquintas","id":120217,"avatar_url":"https://avatars.githubusercontent.com/u/120217?v=3","gravatar_id":"","url":"https://api.github.com/users/dgquintas","html_url":"https://github.com/dgquintas","followers_url":"https://api.github.com/users/dgquintas/followers","following_url":"https://api.github.com/users/dgquintas/following{/other_user}","gists_url":"https://api.github.com/users/dgquintas/gists{/gist_id}","starred_url":"https://api.github.com/users/dgquintas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgquintas/subscriptions","organizations_url":"https://api.github.com/users/dgquintas/orgs","repos_url":"https://api.github.com/users/dgquintas/repos","events_url":"https://api.github.com/users/dgquintas/events{/privacy}","received_events_url":"https://api.github.com/users/dgquintas/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dgquintas/grpc","description":"The C based gRPC (C++, Node.js, Python, Ruby, Objective-C, PHP, C#)","fork":true,"url":"https://api.github.com/repos/dgquintas/grpc","forks_url":"https://api.github.com/repos/dgquintas/grpc/forks","keys_url":"https://api.github.com/repos/dgquintas/grpc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dgquintas/grpc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dgquintas/grpc/teams","hooks_url":"https://api.github.com/repos/dgquintas/grpc/hooks","issue_events_url":"https://api.github.com/repos/dgquintas/grpc/issues/events{/number}","events_url":"https://api.github.com/repos/dgquintas/grpc/events","assignees_url":"https://api.github.com/repos/dgquintas/grpc/assignees{/user}","branches_url":"https://api.github.com/repos/dgquintas/grpc/branches{/branch}","tags_url":"https://api.github.com/repos/dgquintas/grpc/tags","blobs_url":"https://api.github.com/repos/dgquintas/grpc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dgquintas/grpc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dgquintas/grpc/git/refs{/sha}","trees_url":"https://api.github.com/repos/dgquintas/grpc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dgquintas/grpc/statuses/{sha}","languages_url":"https://api.github.com/repos/dgquintas/grpc/languages","stargazers_url":"https://api.github.com/repos/dgquintas/grpc/stargazers","contributors_url":"https://api.github.com/repos/dgquintas/grpc/contributors","subscribers_url":"https://api.github.com/repos/dgquintas/grpc/subscribers","subscription_url":"https://api.github.com/repos/dgquintas/grpc/subscription","commits_url":"https://api.github.com/repos/dgquintas/grpc/commits{/sha}","git_commits_url":"https://api.github.com/repos/dgquintas/grpc/git/commits{/sha}","comments_url":"https://api.github.com/repos/dgquintas/grpc/comments{/number}","issue_comment_url":"https://api.github.com/repos/dgquintas/grpc/issues/comments{/number}","contents_url":"https://api.github.com/repos/dgquintas/grpc/contents/{+path}","compare_url":"https://api.github.com/repos/dgquintas/grpc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dgquintas/grpc/merges","archive_url":"https://api.github.com/repos/dgquintas/grpc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dgquintas/grpc/downloads","issues_url":"https://api.github.com/repos/dgquintas/grpc/issues{/number}","pulls_url":"https://api.github.com/repos/dgquintas/grpc/pulls{/number}","milestones_url":"https://api.github.com/repos/dgquintas/grpc/milestones{/number}","notifications_url":"https://api.github.com/repos/dgquintas/grpc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dgquintas/grpc/labels{/name}","releases_url":"https://api.github.com/repos/dgquintas/grpc/releases{/id}","deployments_url":"https://api.github.com/repos/dgquintas/grpc/deployments","created_at":"2015-04-24T23:07:11Z","updated_at":"2016-02-03T02:19:19Z","pushed_at":"2016-09-28T16:54:16Z","git_url":"git://github.com/dgquintas/grpc.git","ssh_url":"git@github.com:dgquintas/grpc.git","clone_url":"https://github.com/dgquintas/grpc.git","svn_url":"https://github.com/dgquintas/grpc","homepage":"","size":77651,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"grpc:master","ref":"master","sha":"7ab8eecdc9c0c2b1ebb2e69d7460bebca774ebd9","user":{"login":"grpc","id":7802525,"avatar_url":"https://avatars.githubusercontent.com/u/7802525?v=3","gravatar_id":"","url":"https://api.github.com/users/grpc","html_url":"https://github.com/grpc","followers_url":"https://api.github.com/users/grpc/followers","following_url":"https://api.github.com/users/grpc/following{/other_user}","gists_url":"https://api.github.com/users/grpc/gists{/gist_id}","starred_url":"https://api.github.com/users/grpc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grpc/subscriptions","organizations_url":"https://api.github.com/users/grpc/orgs","repos_url":"https://api.github.com/users/grpc/repos","events_url":"https://api.github.com/users/grpc/events{/privacy}","received_events_url":"https://api.github.com/users/grpc/received_events","type":"Organization","site_admin":false},"repo":{"id":27729880,"name":"grpc","full_name":"grpc/grpc","owner":{"login":"grpc","id":7802525,"avatar_url":"https://avatars.githubusercontent.com/u/7802525?v=3","gravatar_id":"","url":"https://api.github.com/users/grpc","html_url":"https://github.com/grpc","followers_url":"https://api.github.com/users/grpc/followers","following_url":"https://api.github.com/users/grpc/following{/other_user}","gists_url":"https://api.github.com/users/grpc/gists{/gist_id}","starred_url":"https://api.github.com/users/grpc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grpc/subscriptions","organizations_url":"https://api.github.com/users/grpc/orgs","repos_url":"https://api.github.com/users/grpc/repos","events_url":"https://api.github.com/users/grpc/events{/privacy}","received_events_url":"https://api.github.com/users/grpc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/grpc/grpc","description":"The C based gRPC (C++, Node.js, Python, Ruby, Objective-C, PHP, C#)","fork":false,"url":"https://api.github.com/repos/grpc/grpc","forks_url":"https://api.github.com/repos/grpc/grpc/forks","keys_url":"https://api.github.com/repos/grpc/grpc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/grpc/grpc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/grpc/grpc/teams","hooks_url":"https://api.github.com/repos/grpc/grpc/hooks","issue_events_url":"https://api.github.com/repos/grpc/grpc/issues/events{/number}","events_url":"https://api.github.com/repos/grpc/grpc/events","assignees_url":"https://api.github.com/repos/grpc/grpc/assignees{/user}","branches_url":"https://api.github.com/repos/grpc/grpc/branches{/branch}","tags_url":"https://api.github.com/repos/grpc/grpc/tags","blobs_url":"https://api.github.com/repos/grpc/grpc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/grpc/grpc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/grpc/grpc/git/refs{/sha}","trees_url":"https://api.github.com/repos/grpc/grpc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/grpc/grpc/statuses/{sha}","languages_url":"https://api.github.com/repos/grpc/grpc/languages","stargazers_url":"https://api.github.com/repos/grpc/grpc/stargazers","contributors_url":"https://api.github.com/repos/grpc/grpc/contributors","subscribers_url":"https://api.github.com/repos/grpc/grpc/subscribers","subscription_url":"https://api.github.com/repos/grpc/grpc/subscription","commits_url":"https://api.github.com/repos/grpc/grpc/commits{/sha}","git_commits_url":"https://api.github.com/repos/grpc/grpc/git/commits{/sha}","comments_url":"https://api.github.com/repos/grpc/grpc/comments{/number}","issue_comment_url":"https://api.github.com/repos/grpc/grpc/issues/comments{/number}","contents_url":"https://api.github.com/repos/grpc/grpc/contents/{+path}","compare_url":"https://api.github.com/repos/grpc/grpc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/grpc/grpc/merges","archive_url":"https://api.github.com/repos/grpc/grpc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/grpc/grpc/downloads","issues_url":"https://api.github.com/repos/grpc/grpc/issues{/number}","pulls_url":"https://api.github.com/repos/grpc/grpc/pulls{/number}","milestones_url":"https://api.github.com/repos/grpc/grpc/milestones{/number}","notifications_url":"https://api.github.com/repos/grpc/grpc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/grpc/grpc/labels{/name}","releases_url":"https://api.github.com/repos/grpc/grpc/releases{/id}","deployments_url":"https://api.github.com/repos/grpc/grpc/deployments","created_at":"2014-12-08T18:58:53Z","updated_at":"2016-09-28T18:01:56Z","pushed_at":"2016-09-28T19:51:10Z","git_url":"git://github.com/grpc/grpc.git","ssh_url":"git@github.com:grpc/grpc.git","clone_url":"https://github.com/grpc/grpc.git","svn_url":"https://github.com/grpc/grpc","homepage":"","size":213307,"stargazers_count":7269,"watchers_count":7269,"language":"C","has_issues":true,"has_downloads":false,"has_wiki":true,"has_pages":true,"forks_count":1375,"mirror_url":null,"open_issues_count":818,"forks":1375,"open_issues":818,"watchers":7269,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/grpc/grpc/pulls/8226"},"html":{"href":"https://github.com/grpc/grpc/pull/8226"},"issue":{"href":"https://api.github.com/repos/grpc/grpc/issues/8226"},"comments":{"href":"https://api.github.com/repos/grpc/grpc/issues/8226/comments"},"review_comments":{"href":"https://api.github.com/repos/grpc/grpc/pulls/8226/comments"},"review_comment":{"href":"https://api.github.com/repos/grpc/grpc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/grpc/grpc/pulls/8226/commits"},"statuses":{"href":"https://api.github.com/repos/grpc/grpc/statuses/5f2e90e3aeb39c53f9b4e71cbf1af0f28f78d46a"}}}}
{"actor":{"display_login":"markdroth"}}