{"action":"created","issue":{"url":"https://api.github.com/repos/TokTok/c-toxcore/issues/226","repository_url":"https://api.github.com/repos/TokTok/c-toxcore","labels_url":"https://api.github.com/repos/TokTok/c-toxcore/issues/226/labels{/name}","comments_url":"https://api.github.com/repos/TokTok/c-toxcore/issues/226/comments","events_url":"https://api.github.com/repos/TokTok/c-toxcore/issues/226/events","html_url":"https://github.com/TokTok/c-toxcore/pull/226","id":186484034,"number":226,"title":"Add NAT traversal","user":{"login":"Ansa89","id":6872182,"avatar_url":"https://avatars.githubusercontent.com/u/6872182?v=3","gravatar_id":"","url":"https://api.github.com/users/Ansa89","html_url":"https://github.com/Ansa89","followers_url":"https://api.github.com/users/Ansa89/followers","following_url":"https://api.github.com/users/Ansa89/following{/other_user}","gists_url":"https://api.github.com/users/Ansa89/gists{/gist_id}","starred_url":"https://api.github.com/users/Ansa89/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ansa89/subscriptions","organizations_url":"https://api.github.com/users/Ansa89/orgs","repos_url":"https://api.github.com/users/Ansa89/repos","events_url":"https://api.github.com/users/Ansa89/events{/privacy}","received_events_url":"https://api.github.com/users/Ansa89/received_events","type":"User","site_admin":false},"labels":[{"id":403702218,"url":"https://api.github.com/repos/TokTok/c-toxcore/labels/CAT:enhancement","name":"CAT:enhancement","color":"84b6eb","default":false},{"id":438496130,"url":"https://api.github.com/repos/TokTok/c-toxcore/labels/MOD:Network","name":"MOD:Network","color":"d4c5f9","default":false}],"state":"open","locked":false,"assignee":{"login":"GrayHatter","id":243408,"avatar_url":"https://avatars.githubusercontent.com/u/243408?v=3","gravatar_id":"","url":"https://api.github.com/users/GrayHatter","html_url":"https://github.com/GrayHatter","followers_url":"https://api.github.com/users/GrayHatter/followers","following_url":"https://api.github.com/users/GrayHatter/following{/other_user}","gists_url":"https://api.github.com/users/GrayHatter/gists{/gist_id}","starred_url":"https://api.github.com/users/GrayHatter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GrayHatter/subscriptions","organizations_url":"https://api.github.com/users/GrayHatter/orgs","repos_url":"https://api.github.com/users/GrayHatter/repos","events_url":"https://api.github.com/users/GrayHatter/events{/privacy}","received_events_url":"https://api.github.com/users/GrayHatter/received_events","type":"User","site_admin":false},"assignees":[{"login":"GrayHatter","id":243408,"avatar_url":"https://avatars.githubusercontent.com/u/243408?v=3","gravatar_id":"","url":"https://api.github.com/users/GrayHatter","html_url":"https://github.com/GrayHatter","followers_url":"https://api.github.com/users/GrayHatter/followers","following_url":"https://api.github.com/users/GrayHatter/following{/other_user}","gists_url":"https://api.github.com/users/GrayHatter/gists{/gist_id}","starred_url":"https://api.github.com/users/GrayHatter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GrayHatter/subscriptions","organizations_url":"https://api.github.com/users/GrayHatter/orgs","repos_url":"https://api.github.com/users/GrayHatter/repos","events_url":"https://api.github.com/users/GrayHatter/events{/privacy}","received_events_url":"https://api.github.com/users/GrayHatter/received_events","type":"User","site_admin":false},{"login":"zetok","id":3148759,"avatar_url":"https://avatars.githubusercontent.com/u/3148759?v=3","gravatar_id":"","url":"https://api.github.com/users/zetok","html_url":"https://github.com/zetok","followers_url":"https://api.github.com/users/zetok/followers","following_url":"https://api.github.com/users/zetok/following{/other_user}","gists_url":"https://api.github.com/users/zetok/gists{/gist_id}","starred_url":"https://api.github.com/users/zetok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zetok/subscriptions","organizations_url":"https://api.github.com/users/zetok/orgs","repos_url":"https://api.github.com/users/zetok/repos","events_url":"https://api.github.com/users/zetok/events{/privacy}","received_events_url":"https://api.github.com/users/zetok/received_events","type":"User","site_admin":false},{"login":"iphydf","id":10647936,"avatar_url":"https://avatars.githubusercontent.com/u/10647936?v=3","gravatar_id":"","url":"https://api.github.com/users/iphydf","html_url":"https://github.com/iphydf","followers_url":"https://api.github.com/users/iphydf/followers","following_url":"https://api.github.com/users/iphydf/following{/other_user}","gists_url":"https://api.github.com/users/iphydf/gists{/gist_id}","starred_url":"https://api.github.com/users/iphydf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iphydf/subscriptions","organizations_url":"https://api.github.com/users/iphydf/orgs","repos_url":"https://api.github.com/users/iphydf/repos","events_url":"https://api.github.com/users/iphydf/events{/privacy}","received_events_url":"https://api.github.com/users/iphydf/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/TokTok/c-toxcore/milestones/7","html_url":"https://github.com/TokTok/c-toxcore/milestones/v0.0.4","labels_url":"https://api.github.com/repos/TokTok/c-toxcore/milestones/7/labels","id":2094233,"number":7,"title":"v0.0.4","description":null,"creator":{"login":"GrayHatter","id":243408,"avatar_url":"https://avatars.githubusercontent.com/u/243408?v=3","gravatar_id":"","url":"https://api.github.com/users/GrayHatter","html_url":"https://github.com/GrayHatter","followers_url":"https://api.github.com/users/GrayHatter/followers","following_url":"https://api.github.com/users/GrayHatter/following{/other_user}","gists_url":"https://api.github.com/users/GrayHatter/gists{/gist_id}","starred_url":"https://api.github.com/users/GrayHatter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GrayHatter/subscriptions","organizations_url":"https://api.github.com/users/GrayHatter/orgs","repos_url":"https://api.github.com/users/GrayHatter/repos","events_url":"https://api.github.com/users/GrayHatter/events{/privacy}","received_events_url":"https://api.github.com/users/GrayHatter/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":0,"state":"open","created_at":"2016-10-26T07:52:55Z","updated_at":"2016-11-02T05:58:07Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2016-11-01T08:41:20Z","updated_at":"2016-11-02T10:04:25Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/TokTok/c-toxcore/pulls/226","html_url":"https://github.com/TokTok/c-toxcore/pull/226","diff_url":"https://github.com/TokTok/c-toxcore/pull/226.diff","patch_url":"https://github.com/TokTok/c-toxcore/pull/226.patch"},"body":"Requested in TokTok/c-toxcore#195\r\n\r\nRequested by @GrayHatter in  https://github.com/TokTok/c-toxcore/pull/209#pullrequestreview-6549505\r\n\r\nPrevious PR: TokTok/c-toxcore#209\r\n\r\nRelated issues:\r\n- TokTok/c-toxcore#214\r\n- TokTok/c-toxcore#219\r\n\r\nCC: @GrayHatter @zetok @iphydf\r\n\r\n<!-- Reviewable:start -->\r\n---\r\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/toktok/c-toxcore/226)\r\n<!-- Reviewable:end -->\r\n"},"comment":{"url":"https://api.github.com/repos/TokTok/c-toxcore/issues/comments/257821786","html_url":"https://github.com/TokTok/c-toxcore/pull/226#issuecomment-257821786","issue_url":"https://api.github.com/repos/TokTok/c-toxcore/issues/226","id":257821786,"user":{"login":"Ansa89","id":6872182,"avatar_url":"https://avatars.githubusercontent.com/u/6872182?v=3","gravatar_id":"","url":"https://api.github.com/users/Ansa89","html_url":"https://github.com/Ansa89","followers_url":"https://api.github.com/users/Ansa89/followers","following_url":"https://api.github.com/users/Ansa89/following{/other_user}","gists_url":"https://api.github.com/users/Ansa89/gists{/gist_id}","starred_url":"https://api.github.com/users/Ansa89/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ansa89/subscriptions","organizations_url":"https://api.github.com/users/Ansa89/orgs","repos_url":"https://api.github.com/users/Ansa89/repos","events_url":"https://api.github.com/users/Ansa89/events{/privacy}","received_events_url":"https://api.github.com/users/Ansa89/received_events","type":"User","site_admin":false},"created_at":"2016-11-02T10:04:25Z","updated_at":"2016-11-02T10:04:25Z","body":"\n\n\n\nReview status: 17 of 24 files reviewed at latest revision, 10 unresolved discussions.\n\n---\n\n*[toxcore/nat_traversal.c, line 225 at r2](https://reviewable.io:443/reviews/toktok/c-toxcore/226#-KVYdesPzzYTr-VZ9RI9:-KVZT5r_3a1vij_LPAyu:bslqw8e) ([raw file](https://github.com/toktok/c-toxcore/blob/4414d4181887ba28dee6b2fda9d2f57dc4e57c2f/toxcore/nat_traversal.c#L225)):*\n<details><summary><i>Previously, GrayHatter (Gregory Mullen) wrote…</i></summary>\n> what are we doing with this?\n</details>\nChecking for a valid `traversal_type`.\n\n---\n\n*[toxcore/nat_traversal.c, line 236 at r2](https://reviewable.io:443/reviews/toktok/c-toxcore/226#-KVYcz5m4dgzATHmBaQd:-KVZSJH2Ej2ioaycXEyp:b-kdi818) ([raw file](https://github.com/toktok/c-toxcore/blob/4414d4181887ba28dee6b2fda9d2f57dc4e57c2f/toxcore/nat_traversal.c#L236)):*\n<details><summary><i>Previously, GrayHatter (Gregory Mullen) wrote…</i></summary>\n> It'll more efficient to move the `#ifdef` inside the if's so that they're only run once and either or both will be called if available.\n</details>\nI don't think so: `#ifdef` is a preprocessor instruction used to allow/deny compilation of the code between `#ifdef` and `#endif`.\nPutting it after the `if`, will introduce unnecessary code.\n\n---\n\n*[toxcore/TCP_server.c, line 1105 at r2](https://reviewable.io:443/reviews/toktok/c-toxcore/226#-KVYexLXkcH2jEGsecp_:-KVZTGe1hxHarM78mAIV:bm6hy55) ([raw file](https://github.com/toktok/c-toxcore/blob/4414d4181887ba28dee6b2fda9d2f57dc4e57c2f/toxcore/TCP_server.c#L1105)):*\n<details><summary><i>Previously, GrayHatter (Gregory Mullen) wrote…</i></summary>\n> is ntohs() fixing something?\n</details>\nI don't know, copy/pasted from `network.c`.\nShould I remove it?\n\n---\n\n*[toxcore/tox.api.h, line 379 at r1](https://reviewable.io:443/reviews/toktok/c-toxcore/226#-KVU774wrS_5TZCHji8Q:-KVZTWU5x6t0BYX_W_nC:b-hoytj) ([raw file](https://github.com/toktok/c-toxcore/blob/bcc8750abb0ef9ce57e025acb3afa4efd8963995/toxcore/tox.api.h#L379)):*\n<details><summary><i>Previously, GrayHatter (Gregory Mullen) wrote…</i></summary>\n> It's pretty simple\n> \n> just give each option in's own `bit` \n> \n> ```\n> NONE = 0,        // binary 0b0000\n> UPNP = 1 << 0,   // binary 0b0001\n> NATPMP = 1 << 1, // binary 0b0010\n> ALL = ~0,        // binary 0b1111 in otherwords 0b0001 \n>                                               + 0b0010\n> ```\n</details>\nDone, but `other/astyle/format-source` now generates an empty `tox.h`.\nProbably it has to do with setting values inside an enum type and the apidls parser, but I don't know how to solve this.\nMaybe @iphydf has some hints.\n\n---\n\n\n*Comments from [Reviewable](https://reviewable.io:443/reviews/toktok/c-toxcore/226)*\n<!-- Sent from Reviewable.io -->\n"}}
{"actor":{"display_login":"Ansa89"}}