{"action":"created","comment":{"url":"https://api.github.com/repos/arvidn/libtorrent/pulls/comments/44883245","id":44883245,"diff_hunk":"@@ -6605,9 +6605,18 @@ namespace aux {\n \t\tset_external_address(ip, source_dht, source);\n \t}\n \n-\taddress session_impl::external_address()\n+\taddress session_impl::external_address(address_type at)\n \t{\n-\t\treturn m_external_ip.external_address(address_v4());\n+#if TORRENT_USE_IPV6","path":"src/session_impl.cpp","position":8,"original_position":8,"commit_id":"743896ac918c2cda020aeb1ec8e6c0ce5c4315ae","original_commit_id":"743896ac918c2cda020aeb1ec8e6c0ce5c4315ae","user":{"login":"arvidn","id":661450,"avatar_url":"https://avatars.githubusercontent.com/u/661450?v=3","gravatar_id":"","url":"https://api.github.com/users/arvidn","html_url":"https://github.com/arvidn","followers_url":"https://api.github.com/users/arvidn/followers","following_url":"https://api.github.com/users/arvidn/following{/other_user}","gists_url":"https://api.github.com/users/arvidn/gists{/gist_id}","starred_url":"https://api.github.com/users/arvidn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arvidn/subscriptions","organizations_url":"https://api.github.com/users/arvidn/orgs","repos_url":"https://api.github.com/users/arvidn/repos","events_url":"https://api.github.com/users/arvidn/events{/privacy}","received_events_url":"https://api.github.com/users/arvidn/received_events","type":"User","site_admin":false},"body":"this interleaving is hard to read I think. could you initialize a variable address, to either v4 or v6 and then do the call unconditionally? and maybe coalesce the #if/#endif blocks","created_at":"2015-11-16T01:57:56Z","updated_at":"2015-11-16T01:57:56Z","html_url":"https://github.com/arvidn/libtorrent/pull/268#discussion_r44883245","pull_request_url":"https://api.github.com/repos/arvidn/libtorrent/pulls/268","_links":{"self":{"href":"https://api.github.com/repos/arvidn/libtorrent/pulls/comments/44883245"},"html":{"href":"https://github.com/arvidn/libtorrent/pull/268#discussion_r44883245"},"pull_request":{"href":"https://api.github.com/repos/arvidn/libtorrent/pulls/268"}}},"pull_request":{"url":"https://api.github.com/repos/arvidn/libtorrent/pulls/268","id":50737280,"html_url":"https://github.com/arvidn/libtorrent/pull/268","diff_url":"https://github.com/arvidn/libtorrent/pull/268.diff","patch_url":"https://github.com/arvidn/libtorrent/pull/268.patch","issue_url":"https://api.github.com/repos/arvidn/libtorrent/issues/268","number":268,"state":"open","locked":false,"title":"Support DHT over IPv6","user":{"login":"ssiloti","id":155790,"avatar_url":"https://avatars.githubusercontent.com/u/155790?v=3","gravatar_id":"","url":"https://api.github.com/users/ssiloti","html_url":"https://github.com/ssiloti","followers_url":"https://api.github.com/users/ssiloti/followers","following_url":"https://api.github.com/users/ssiloti/following{/other_user}","gists_url":"https://api.github.com/users/ssiloti/gists{/gist_id}","starred_url":"https://api.github.com/users/ssiloti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ssiloti/subscriptions","organizations_url":"https://api.github.com/users/ssiloti/orgs","repos_url":"https://api.github.com/users/ssiloti/repos","events_url":"https://api.github.com/users/ssiloti/events{/privacy}","received_events_url":"https://api.github.com/users/ssiloti/received_events","type":"User","site_admin":false},"body":"Note this has seen limited real-world testing because IPv6 doesn't make is easy to bind multiple local addresses like IPv4 does.","created_at":"2015-11-15T01:46:09Z","updated_at":"2015-11-16T01:57:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"79d91424831df6eab3f82ba409e6f9a275ac071f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/arvidn/libtorrent/pulls/268/commits","review_comments_url":"https://api.github.com/repos/arvidn/libtorrent/pulls/268/comments","review_comment_url":"https://api.github.com/repos/arvidn/libtorrent/pulls/comments{/number}","comments_url":"https://api.github.com/repos/arvidn/libtorrent/issues/268/comments","statuses_url":"https://api.github.com/repos/arvidn/libtorrent/statuses/743896ac918c2cda020aeb1ec8e6c0ce5c4315ae","head":{"label":"ssiloti:dht-ipv6","ref":"dht-ipv6","sha":"743896ac918c2cda020aeb1ec8e6c0ce5c4315ae","user":{"login":"ssiloti","id":155790,"avatar_url":"https://avatars.githubusercontent.com/u/155790?v=3","gravatar_id":"","url":"https://api.github.com/users/ssiloti","html_url":"https://github.com/ssiloti","followers_url":"https://api.github.com/users/ssiloti/followers","following_url":"https://api.github.com/users/ssiloti/following{/other_user}","gists_url":"https://api.github.com/users/ssiloti/gists{/gist_id}","starred_url":"https://api.github.com/users/ssiloti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ssiloti/subscriptions","organizations_url":"https://api.github.com/users/ssiloti/orgs","repos_url":"https://api.github.com/users/ssiloti/repos","events_url":"https://api.github.com/users/ssiloti/events{/privacy}","received_events_url":"https://api.github.com/users/ssiloti/received_events","type":"User","site_admin":false},"repo":{"id":37429203,"name":"libtorrent","full_name":"ssiloti/libtorrent","owner":{"login":"ssiloti","id":155790,"avatar_url":"https://avatars.githubusercontent.com/u/155790?v=3","gravatar_id":"","url":"https://api.github.com/users/ssiloti","html_url":"https://github.com/ssiloti","followers_url":"https://api.github.com/users/ssiloti/followers","following_url":"https://api.github.com/users/ssiloti/following{/other_user}","gists_url":"https://api.github.com/users/ssiloti/gists{/gist_id}","starred_url":"https://api.github.com/users/ssiloti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ssiloti/subscriptions","organizations_url":"https://api.github.com/users/ssiloti/orgs","repos_url":"https://api.github.com/users/ssiloti/repos","events_url":"https://api.github.com/users/ssiloti/events{/privacy}","received_events_url":"https://api.github.com/users/ssiloti/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ssiloti/libtorrent","description":"an efficient feature complete C++ bittorrent implementation","fork":true,"url":"https://api.github.com/repos/ssiloti/libtorrent","forks_url":"https://api.github.com/repos/ssiloti/libtorrent/forks","keys_url":"https://api.github.com/repos/ssiloti/libtorrent/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ssiloti/libtorrent/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ssiloti/libtorrent/teams","hooks_url":"https://api.github.com/repos/ssiloti/libtorrent/hooks","issue_events_url":"https://api.github.com/repos/ssiloti/libtorrent/issues/events{/number}","events_url":"https://api.github.com/repos/ssiloti/libtorrent/events","assignees_url":"https://api.github.com/repos/ssiloti/libtorrent/assignees{/user}","branches_url":"https://api.github.com/repos/ssiloti/libtorrent/branches{/branch}","tags_url":"https://api.github.com/repos/ssiloti/libtorrent/tags","blobs_url":"https://api.github.com/repos/ssiloti/libtorrent/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ssiloti/libtorrent/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ssiloti/libtorrent/git/refs{/sha}","trees_url":"https://api.github.com/repos/ssiloti/libtorrent/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ssiloti/libtorrent/statuses/{sha}","languages_url":"https://api.github.com/repos/ssiloti/libtorrent/languages","stargazers_url":"https://api.github.com/repos/ssiloti/libtorrent/stargazers","contributors_url":"https://api.github.com/repos/ssiloti/libtorrent/contributors","subscribers_url":"https://api.github.com/repos/ssiloti/libtorrent/subscribers","subscription_url":"https://api.github.com/repos/ssiloti/libtorrent/subscription","commits_url":"https://api.github.com/repos/ssiloti/libtorrent/commits{/sha}","git_commits_url":"https://api.github.com/repos/ssiloti/libtorrent/git/commits{/sha}","comments_url":"https://api.github.com/repos/ssiloti/libtorrent/comments{/number}","issue_comment_url":"https://api.github.com/repos/ssiloti/libtorrent/issues/comments{/number}","contents_url":"https://api.github.com/repos/ssiloti/libtorrent/contents/{+path}","compare_url":"https://api.github.com/repos/ssiloti/libtorrent/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ssiloti/libtorrent/merges","archive_url":"https://api.github.com/repos/ssiloti/libtorrent/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ssiloti/libtorrent/downloads","issues_url":"https://api.github.com/repos/ssiloti/libtorrent/issues{/number}","pulls_url":"https://api.github.com/repos/ssiloti/libtorrent/pulls{/number}","milestones_url":"https://api.github.com/repos/ssiloti/libtorrent/milestones{/number}","notifications_url":"https://api.github.com/repos/ssiloti/libtorrent/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ssiloti/libtorrent/labels{/name}","releases_url":"https://api.github.com/repos/ssiloti/libtorrent/releases{/id}","created_at":"2015-06-14T20:53:10Z","updated_at":"2015-06-14T20:53:20Z","pushed_at":"2015-11-15T18:21:54Z","git_url":"git://github.com/ssiloti/libtorrent.git","ssh_url":"git@github.com:ssiloti/libtorrent.git","clone_url":"https://github.com/ssiloti/libtorrent.git","svn_url":"https://github.com/ssiloti/libtorrent","homepage":"http://libtorrent.org","size":47366,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"arvidn:master","ref":"master","sha":"64aba31e30452c65e401e1e279d9cd64ce4e3d18","user":{"login":"arvidn","id":661450,"avatar_url":"https://avatars.githubusercontent.com/u/661450?v=3","gravatar_id":"","url":"https://api.github.com/users/arvidn","html_url":"https://github.com/arvidn","followers_url":"https://api.github.com/users/arvidn/followers","following_url":"https://api.github.com/users/arvidn/following{/other_user}","gists_url":"https://api.github.com/users/arvidn/gists{/gist_id}","starred_url":"https://api.github.com/users/arvidn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arvidn/subscriptions","organizations_url":"https://api.github.com/users/arvidn/orgs","repos_url":"https://api.github.com/users/arvidn/repos","events_url":"https://api.github.com/users/arvidn/events{/privacy}","received_events_url":"https://api.github.com/users/arvidn/received_events","type":"User","site_admin":false},"repo":{"id":36781769,"name":"libtorrent","full_name":"arvidn/libtorrent","owner":{"login":"arvidn","id":661450,"avatar_url":"https://avatars.githubusercontent.com/u/661450?v=3","gravatar_id":"","url":"https://api.github.com/users/arvidn","html_url":"https://github.com/arvidn","followers_url":"https://api.github.com/users/arvidn/followers","following_url":"https://api.github.com/users/arvidn/following{/other_user}","gists_url":"https://api.github.com/users/arvidn/gists{/gist_id}","starred_url":"https://api.github.com/users/arvidn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arvidn/subscriptions","organizations_url":"https://api.github.com/users/arvidn/orgs","repos_url":"https://api.github.com/users/arvidn/repos","events_url":"https://api.github.com/users/arvidn/events{/privacy}","received_events_url":"https://api.github.com/users/arvidn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/arvidn/libtorrent","description":"an efficient feature complete C++ bittorrent implementation","fork":false,"url":"https://api.github.com/repos/arvidn/libtorrent","forks_url":"https://api.github.com/repos/arvidn/libtorrent/forks","keys_url":"https://api.github.com/repos/arvidn/libtorrent/keys{/key_id}","collaborators_url":"https://api.github.com/repos/arvidn/libtorrent/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/arvidn/libtorrent/teams","hooks_url":"https://api.github.com/repos/arvidn/libtorrent/hooks","issue_events_url":"https://api.github.com/repos/arvidn/libtorrent/issues/events{/number}","events_url":"https://api.github.com/repos/arvidn/libtorrent/events","assignees_url":"https://api.github.com/repos/arvidn/libtorrent/assignees{/user}","branches_url":"https://api.github.com/repos/arvidn/libtorrent/branches{/branch}","tags_url":"https://api.github.com/repos/arvidn/libtorrent/tags","blobs_url":"https://api.github.com/repos/arvidn/libtorrent/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/arvidn/libtorrent/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/arvidn/libtorrent/git/refs{/sha}","trees_url":"https://api.github.com/repos/arvidn/libtorrent/git/trees{/sha}","statuses_url":"https://api.github.com/repos/arvidn/libtorrent/statuses/{sha}","languages_url":"https://api.github.com/repos/arvidn/libtorrent/languages","stargazers_url":"https://api.github.com/repos/arvidn/libtorrent/stargazers","contributors_url":"https://api.github.com/repos/arvidn/libtorrent/contributors","subscribers_url":"https://api.github.com/repos/arvidn/libtorrent/subscribers","subscription_url":"https://api.github.com/repos/arvidn/libtorrent/subscription","commits_url":"https://api.github.com/repos/arvidn/libtorrent/commits{/sha}","git_commits_url":"https://api.github.com/repos/arvidn/libtorrent/git/commits{/sha}","comments_url":"https://api.github.com/repos/arvidn/libtorrent/comments{/number}","issue_comment_url":"https://api.github.com/repos/arvidn/libtorrent/issues/comments{/number}","contents_url":"https://api.github.com/repos/arvidn/libtorrent/contents/{+path}","compare_url":"https://api.github.com/repos/arvidn/libtorrent/compare/{base}...{head}","merges_url":"https://api.github.com/repos/arvidn/libtorrent/merges","archive_url":"https://api.github.com/repos/arvidn/libtorrent/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/arvidn/libtorrent/downloads","issues_url":"https://api.github.com/repos/arvidn/libtorrent/issues{/number}","pulls_url":"https://api.github.com/repos/arvidn/libtorrent/pulls{/number}","milestones_url":"https://api.github.com/repos/arvidn/libtorrent/milestones{/number}","notifications_url":"https://api.github.com/repos/arvidn/libtorrent/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/arvidn/libtorrent/labels{/name}","releases_url":"https://api.github.com/repos/arvidn/libtorrent/releases{/id}","created_at":"2015-06-03T05:22:03Z","updated_at":"2015-11-15T18:33:29Z","pushed_at":"2015-11-15T23:13:01Z","git_url":"git://github.com/arvidn/libtorrent.git","ssh_url":"git@github.com:arvidn/libtorrent.git","clone_url":"https://github.com/arvidn/libtorrent.git","svn_url":"https://github.com/arvidn/libtorrent","homepage":"http://libtorrent.org","size":69296,"stargazers_count":209,"watchers_count":209,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":59,"mirror_url":null,"open_issues_count":35,"forks":59,"open_issues":35,"watchers":209,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/arvidn/libtorrent/pulls/268"},"html":{"href":"https://github.com/arvidn/libtorrent/pull/268"},"issue":{"href":"https://api.github.com/repos/arvidn/libtorrent/issues/268"},"comments":{"href":"https://api.github.com/repos/arvidn/libtorrent/issues/268/comments"},"review_comments":{"href":"https://api.github.com/repos/arvidn/libtorrent/pulls/268/comments"},"review_comment":{"href":"https://api.github.com/repos/arvidn/libtorrent/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/arvidn/libtorrent/pulls/268/commits"},"statuses":{"href":"https://api.github.com/repos/arvidn/libtorrent/statuses/743896ac918c2cda020aeb1ec8e6c0ce5c4315ae"}}}}