{"action":"created","comment":{"url":"https://api.github.com/repos/indutny/node-nat-upnp/pulls/comments/81418145","pull_request_review_id":2402456,"id":81418145,"diff_hunk":"@@ -87,10 +87,13 @@ Client.prototype.getMappings = function getMappings(options, callback) {\n       return !end;\n     }, function(callback) {\n       gateway.run('GetGenericPortMappingEntry', [\n-        [ 'NewPortMappingIndex', ++i ]\n+        [ 'NewPortMappingIndex', i++ ]\n       ], function(err, data) {\n         if (err) {\n-          end = true;\n+          // If we got an error on index 0, ignore it in case this router starts indicies on 1\n+          if (i !== 1) {\n+              end = true;","path":"lib/nat-upnp/client.js","position":11,"original_position":11,"commit_id":"2e91fbe03d357c76c0da721cb77ec1d8bce91bd6","original_commit_id":"2e91fbe03d357c76c0da721cb77ec1d8bce91bd6","user":{"login":"indutny","id":238531,"avatar_url":"https://avatars.githubusercontent.com/u/238531?v=3","gravatar_id":"","url":"https://api.github.com/users/indutny","html_url":"https://github.com/indutny","followers_url":"https://api.github.com/users/indutny/followers","following_url":"https://api.github.com/users/indutny/following{/other_user}","gists_url":"https://api.github.com/users/indutny/gists{/gist_id}","starred_url":"https://api.github.com/users/indutny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/indutny/subscriptions","organizations_url":"https://api.github.com/users/indutny/orgs","repos_url":"https://api.github.com/users/indutny/repos","events_url":"https://api.github.com/users/indutny/events{/privacy}","received_events_url":"https://api.github.com/users/indutny/received_events","type":"User","site_admin":false},"body":"Style, please use 2-space indent.","created_at":"2016-09-30T21:06:44Z","updated_at":"2016-09-30T21:06:56Z","html_url":"https://github.com/indutny/node-nat-upnp/pull/29#discussion_r81418145","pull_request_url":"https://api.github.com/repos/indutny/node-nat-upnp/pulls/29","_links":{"self":{"href":"https://api.github.com/repos/indutny/node-nat-upnp/pulls/comments/81418145"},"html":{"href":"https://github.com/indutny/node-nat-upnp/pull/29#discussion_r81418145"},"pull_request":{"href":"https://api.github.com/repos/indutny/node-nat-upnp/pulls/29"}}},"pull_request":{"url":"https://api.github.com/repos/indutny/node-nat-upnp/pulls/29","id":87298269,"html_url":"https://github.com/indutny/node-nat-upnp/pull/29","diff_url":"https://github.com/indutny/node-nat-upnp/pull/29.diff","patch_url":"https://github.com/indutny/node-nat-upnp/pull/29.patch","issue_url":"https://api.github.com/repos/indutny/node-nat-upnp/issues/29","number":29,"state":"open","locked":false,"title":"client: add support for 0-based indexed routers in getMappings","user":{"login":"carpie","id":569337,"avatar_url":"https://avatars.githubusercontent.com/u/569337?v=3","gravatar_id":"","url":"https://api.github.com/users/carpie","html_url":"https://github.com/carpie","followers_url":"https://api.github.com/users/carpie/followers","following_url":"https://api.github.com/users/carpie/following{/other_user}","gists_url":"https://api.github.com/users/carpie/gists{/gist_id}","starred_url":"https://api.github.com/users/carpie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carpie/subscriptions","organizations_url":"https://api.github.com/users/carpie/orgs","repos_url":"https://api.github.com/users/carpie/repos","events_url":"https://api.github.com/users/carpie/events{/privacy}","received_events_url":"https://api.github.com/users/carpie/received_events","type":"User","site_admin":false},"body":"This change makes getMappings start at 0 to support 0-based indexed routers.  However, it will still check index 1 if index 0 fails to hopefully still support 1-based indexed routers. Addresses issue #28.","created_at":"2016-09-29T11:57:33Z","updated_at":"2016-09-30T21:06:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4dd58f7e519ce55c287de930a80dbd19b1b5cb59","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/indutny/node-nat-upnp/pulls/29/commits","review_comments_url":"https://api.github.com/repos/indutny/node-nat-upnp/pulls/29/comments","review_comment_url":"https://api.github.com/repos/indutny/node-nat-upnp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/indutny/node-nat-upnp/issues/29/comments","statuses_url":"https://api.github.com/repos/indutny/node-nat-upnp/statuses/2e91fbe03d357c76c0da721cb77ec1d8bce91bd6","head":{"label":"carpie:zero_based_mapping","ref":"zero_based_mapping","sha":"2e91fbe03d357c76c0da721cb77ec1d8bce91bd6","user":{"login":"carpie","id":569337,"avatar_url":"https://avatars.githubusercontent.com/u/569337?v=3","gravatar_id":"","url":"https://api.github.com/users/carpie","html_url":"https://github.com/carpie","followers_url":"https://api.github.com/users/carpie/followers","following_url":"https://api.github.com/users/carpie/following{/other_user}","gists_url":"https://api.github.com/users/carpie/gists{/gist_id}","starred_url":"https://api.github.com/users/carpie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carpie/subscriptions","organizations_url":"https://api.github.com/users/carpie/orgs","repos_url":"https://api.github.com/users/carpie/repos","events_url":"https://api.github.com/users/carpie/events{/privacy}","received_events_url":"https://api.github.com/users/carpie/received_events","type":"User","site_admin":false},"repo":{"id":69561047,"name":"node-nat-upnp","full_name":"carpie/node-nat-upnp","owner":{"login":"carpie","id":569337,"avatar_url":"https://avatars.githubusercontent.com/u/569337?v=3","gravatar_id":"","url":"https://api.github.com/users/carpie","html_url":"https://github.com/carpie","followers_url":"https://api.github.com/users/carpie/followers","following_url":"https://api.github.com/users/carpie/following{/other_user}","gists_url":"https://api.github.com/users/carpie/gists{/gist_id}","starred_url":"https://api.github.com/users/carpie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carpie/subscriptions","organizations_url":"https://api.github.com/users/carpie/orgs","repos_url":"https://api.github.com/users/carpie/repos","events_url":"https://api.github.com/users/carpie/events{/privacy}","received_events_url":"https://api.github.com/users/carpie/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/carpie/node-nat-upnp","description":"NAT port mapping via UPnP","fork":true,"url":"https://api.github.com/repos/carpie/node-nat-upnp","forks_url":"https://api.github.com/repos/carpie/node-nat-upnp/forks","keys_url":"https://api.github.com/repos/carpie/node-nat-upnp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/carpie/node-nat-upnp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/carpie/node-nat-upnp/teams","hooks_url":"https://api.github.com/repos/carpie/node-nat-upnp/hooks","issue_events_url":"https://api.github.com/repos/carpie/node-nat-upnp/issues/events{/number}","events_url":"https://api.github.com/repos/carpie/node-nat-upnp/events","assignees_url":"https://api.github.com/repos/carpie/node-nat-upnp/assignees{/user}","branches_url":"https://api.github.com/repos/carpie/node-nat-upnp/branches{/branch}","tags_url":"https://api.github.com/repos/carpie/node-nat-upnp/tags","blobs_url":"https://api.github.com/repos/carpie/node-nat-upnp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/carpie/node-nat-upnp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/carpie/node-nat-upnp/git/refs{/sha}","trees_url":"https://api.github.com/repos/carpie/node-nat-upnp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/carpie/node-nat-upnp/statuses/{sha}","languages_url":"https://api.github.com/repos/carpie/node-nat-upnp/languages","stargazers_url":"https://api.github.com/repos/carpie/node-nat-upnp/stargazers","contributors_url":"https://api.github.com/repos/carpie/node-nat-upnp/contributors","subscribers_url":"https://api.github.com/repos/carpie/node-nat-upnp/subscribers","subscription_url":"https://api.github.com/repos/carpie/node-nat-upnp/subscription","commits_url":"https://api.github.com/repos/carpie/node-nat-upnp/commits{/sha}","git_commits_url":"https://api.github.com/repos/carpie/node-nat-upnp/git/commits{/sha}","comments_url":"https://api.github.com/repos/carpie/node-nat-upnp/comments{/number}","issue_comment_url":"https://api.github.com/repos/carpie/node-nat-upnp/issues/comments{/number}","contents_url":"https://api.github.com/repos/carpie/node-nat-upnp/contents/{+path}","compare_url":"https://api.github.com/repos/carpie/node-nat-upnp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/carpie/node-nat-upnp/merges","archive_url":"https://api.github.com/repos/carpie/node-nat-upnp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/carpie/node-nat-upnp/downloads","issues_url":"https://api.github.com/repos/carpie/node-nat-upnp/issues{/number}","pulls_url":"https://api.github.com/repos/carpie/node-nat-upnp/pulls{/number}","milestones_url":"https://api.github.com/repos/carpie/node-nat-upnp/milestones{/number}","notifications_url":"https://api.github.com/repos/carpie/node-nat-upnp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/carpie/node-nat-upnp/labels{/name}","releases_url":"https://api.github.com/repos/carpie/node-nat-upnp/releases{/id}","deployments_url":"https://api.github.com/repos/carpie/node-nat-upnp/deployments","created_at":"2016-09-29T11:27:11Z","updated_at":"2016-09-29T11:27:12Z","pushed_at":"2016-09-29T11:51:04Z","git_url":"git://github.com/carpie/node-nat-upnp.git","ssh_url":"git@github.com:carpie/node-nat-upnp.git","clone_url":"https://github.com/carpie/node-nat-upnp.git","svn_url":"https://github.com/carpie/node-nat-upnp","homepage":null,"size":36,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"indutny:master","ref":"master","sha":"177843a54d402391080aac05177c51800fec3448","user":{"login":"indutny","id":238531,"avatar_url":"https://avatars.githubusercontent.com/u/238531?v=3","gravatar_id":"","url":"https://api.github.com/users/indutny","html_url":"https://github.com/indutny","followers_url":"https://api.github.com/users/indutny/followers","following_url":"https://api.github.com/users/indutny/following{/other_user}","gists_url":"https://api.github.com/users/indutny/gists{/gist_id}","starred_url":"https://api.github.com/users/indutny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/indutny/subscriptions","organizations_url":"https://api.github.com/users/indutny/orgs","repos_url":"https://api.github.com/users/indutny/repos","events_url":"https://api.github.com/users/indutny/events{/privacy}","received_events_url":"https://api.github.com/users/indutny/received_events","type":"User","site_admin":false},"repo":{"id":5370787,"name":"node-nat-upnp","full_name":"indutny/node-nat-upnp","owner":{"login":"indutny","id":238531,"avatar_url":"https://avatars.githubusercontent.com/u/238531?v=3","gravatar_id":"","url":"https://api.github.com/users/indutny","html_url":"https://github.com/indutny","followers_url":"https://api.github.com/users/indutny/followers","following_url":"https://api.github.com/users/indutny/following{/other_user}","gists_url":"https://api.github.com/users/indutny/gists{/gist_id}","starred_url":"https://api.github.com/users/indutny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/indutny/subscriptions","organizations_url":"https://api.github.com/users/indutny/orgs","repos_url":"https://api.github.com/users/indutny/repos","events_url":"https://api.github.com/users/indutny/events{/privacy}","received_events_url":"https://api.github.com/users/indutny/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/indutny/node-nat-upnp","description":"NAT port mapping via UPnP","fork":false,"url":"https://api.github.com/repos/indutny/node-nat-upnp","forks_url":"https://api.github.com/repos/indutny/node-nat-upnp/forks","keys_url":"https://api.github.com/repos/indutny/node-nat-upnp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/indutny/node-nat-upnp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/indutny/node-nat-upnp/teams","hooks_url":"https://api.github.com/repos/indutny/node-nat-upnp/hooks","issue_events_url":"https://api.github.com/repos/indutny/node-nat-upnp/issues/events{/number}","events_url":"https://api.github.com/repos/indutny/node-nat-upnp/events","assignees_url":"https://api.github.com/repos/indutny/node-nat-upnp/assignees{/user}","branches_url":"https://api.github.com/repos/indutny/node-nat-upnp/branches{/branch}","tags_url":"https://api.github.com/repos/indutny/node-nat-upnp/tags","blobs_url":"https://api.github.com/repos/indutny/node-nat-upnp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/indutny/node-nat-upnp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/indutny/node-nat-upnp/git/refs{/sha}","trees_url":"https://api.github.com/repos/indutny/node-nat-upnp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/indutny/node-nat-upnp/statuses/{sha}","languages_url":"https://api.github.com/repos/indutny/node-nat-upnp/languages","stargazers_url":"https://api.github.com/repos/indutny/node-nat-upnp/stargazers","contributors_url":"https://api.github.com/repos/indutny/node-nat-upnp/contributors","subscribers_url":"https://api.github.com/repos/indutny/node-nat-upnp/subscribers","subscription_url":"https://api.github.com/repos/indutny/node-nat-upnp/subscription","commits_url":"https://api.github.com/repos/indutny/node-nat-upnp/commits{/sha}","git_commits_url":"https://api.github.com/repos/indutny/node-nat-upnp/git/commits{/sha}","comments_url":"https://api.github.com/repos/indutny/node-nat-upnp/comments{/number}","issue_comment_url":"https://api.github.com/repos/indutny/node-nat-upnp/issues/comments{/number}","contents_url":"https://api.github.com/repos/indutny/node-nat-upnp/contents/{+path}","compare_url":"https://api.github.com/repos/indutny/node-nat-upnp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/indutny/node-nat-upnp/merges","archive_url":"https://api.github.com/repos/indutny/node-nat-upnp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/indutny/node-nat-upnp/downloads","issues_url":"https://api.github.com/repos/indutny/node-nat-upnp/issues{/number}","pulls_url":"https://api.github.com/repos/indutny/node-nat-upnp/pulls{/number}","milestones_url":"https://api.github.com/repos/indutny/node-nat-upnp/milestones{/number}","notifications_url":"https://api.github.com/repos/indutny/node-nat-upnp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/indutny/node-nat-upnp/labels{/name}","releases_url":"https://api.github.com/repos/indutny/node-nat-upnp/releases{/id}","deployments_url":"https://api.github.com/repos/indutny/node-nat-upnp/deployments","created_at":"2012-08-10T15:15:27Z","updated_at":"2016-08-30T21:07:57Z","pushed_at":"2016-09-29T11:57:33Z","git_url":"git://github.com/indutny/node-nat-upnp.git","ssh_url":"git@github.com:indutny/node-nat-upnp.git","clone_url":"https://github.com/indutny/node-nat-upnp.git","svn_url":"https://github.com/indutny/node-nat-upnp","homepage":null,"size":57,"stargazers_count":80,"watchers_count":80,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":22,"mirror_url":null,"open_issues_count":12,"forks":22,"open_issues":12,"watchers":80,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/indutny/node-nat-upnp/pulls/29"},"html":{"href":"https://github.com/indutny/node-nat-upnp/pull/29"},"issue":{"href":"https://api.github.com/repos/indutny/node-nat-upnp/issues/29"},"comments":{"href":"https://api.github.com/repos/indutny/node-nat-upnp/issues/29/comments"},"review_comments":{"href":"https://api.github.com/repos/indutny/node-nat-upnp/pulls/29/comments"},"review_comment":{"href":"https://api.github.com/repos/indutny/node-nat-upnp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/indutny/node-nat-upnp/pulls/29/commits"},"statuses":{"href":"https://api.github.com/repos/indutny/node-nat-upnp/statuses/2e91fbe03d357c76c0da721cb77ec1d8bce91bd6"}}}}
{"actor":{"display_login":"indutny"}}