{"action":"created","comment":{"url":"https://api.github.com/repos/cn-uofbasel/ccn-lite/pulls/comments/193723453","pull_request_review_id":126751366,"id":193723453,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5MzcyMzQ1Mw==","diff_hunk":"@@ -570,8 +570,9 @@ ccnl_content_add2cache(struct ccnl_relay_s *ccnl, struct ccnl_content_s *c)\n     DEBUGMSG_CORE(DEBUG, \"ccnl_content_add2cache (%d/%d) --> %p = %s [%d]\\n\",\n                   ccnl->contentcnt, ccnl->max_cache_entries,\n                   (void*)c, ccnl_prefix_to_str(c->pkt->pfx,s,CCNL_MAX_PREFIX_SIZE), (c->pkt->pfx->chunknum)? *(c->pkt->pfx->chunknum) : -1);\n+\n     for (cit = ccnl->contents; cit; cit = cit->next) {\n-        if (c == cit) {\n+        if (ccnl_prefix_cmp(c->pkt->pfx, 0, cit->pkt->pfx, CMP_EXACT) == 0) {","path":"src/ccnl-core/src/ccnl-relay.c","position":7,"original_position":7,"commit_id":"ce5ede2af6bcf131510d018cbf021590f42ad85f","original_commit_id":"ce5ede2af6bcf131510d018cbf021590f42ad85f","user":{"login":"mfrey","id":237157,"node_id":"MDQ6VXNlcjIzNzE1Nw==","avatar_url":"https://avatars1.githubusercontent.com/u/237157?v=4","gravatar_id":"","url":"https://api.github.com/users/mfrey","html_url":"https://github.com/mfrey","followers_url":"https://api.github.com/users/mfrey/followers","following_url":"https://api.github.com/users/mfrey/following{/other_user}","gists_url":"https://api.github.com/users/mfrey/gists{/gist_id}","starred_url":"https://api.github.com/users/mfrey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mfrey/subscriptions","organizations_url":"https://api.github.com/users/mfrey/orgs","repos_url":"https://api.github.com/users/mfrey/repos","events_url":"https://api.github.com/users/mfrey/events{/privacy}","received_events_url":"https://api.github.com/users/mfrey/received_events","type":"User","site_admin":false},"body":"My bad. This was totally unintentional. ","created_at":"2018-06-07T12:12:20Z","updated_at":"2018-06-07T12:12:20Z","html_url":"https://github.com/cn-uofbasel/ccn-lite/pull/266#discussion_r193723453","pull_request_url":"https://api.github.com/repos/cn-uofbasel/ccn-lite/pulls/266","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/cn-uofbasel/ccn-lite/pulls/comments/193723453"},"html":{"href":"https://github.com/cn-uofbasel/ccn-lite/pull/266#discussion_r193723453"},"pull_request":{"href":"https://api.github.com/repos/cn-uofbasel/ccn-lite/pulls/266"}},"in_reply_to_id":193713822},"pull_request":{"url":"https://api.github.com/repos/cn-uofbasel/ccn-lite/pulls/266","id":193278544,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkzMjc4NTQ0","html_url":"https://github.com/cn-uofbasel/ccn-lite/pull/266","diff_url":"https://github.com/cn-uofbasel/ccn-lite/pull/266.diff","patch_url":"https://github.com/cn-uofbasel/ccn-lite/pull/266.patch","issue_url":"https://api.github.com/repos/cn-uofbasel/ccn-lite/issues/266","number":266,"state":"open","locked":false,"title":"fixes ccnl_content_add2cache prefix comparison","user":{"login":"mfrey","id":237157,"node_id":"MDQ6VXNlcjIzNzE1Nw==","avatar_url":"https://avatars1.githubusercontent.com/u/237157?v=4","gravatar_id":"","url":"https://api.github.com/users/mfrey","html_url":"https://github.com/mfrey","followers_url":"https://api.github.com/users/mfrey/followers","following_url":"https://api.github.com/users/mfrey/following{/other_user}","gists_url":"https://api.github.com/users/mfrey/gists{/gist_id}","starred_url":"https://api.github.com/users/mfrey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mfrey/subscriptions","organizations_url":"https://api.github.com/users/mfrey/orgs","repos_url":"https://api.github.com/users/mfrey/repos","events_url":"https://api.github.com/users/mfrey/events{/privacy}","received_events_url":"https://api.github.com/users/mfrey/received_events","type":"User","site_admin":false},"body":"\r\n### Contribution description\r\n\r\nThis PR addresses an issue in function ``ccnl_content_add2cache `` in `` ccnl_relay.c``. Currently, the function checks if the pointer passed to the function has been added before and hence, duplicate content is added to the content store. The function replaces the comparison of pointers with a call to ``ccnl_prefix_cmp`` which checks if the prefix content to be added **exactly** matches an existing entry in the content store.\r\n\r\n\r\n### Issues/PRs references\r\n\r\nFixes #200 \r\n","created_at":"2018-06-07T10:45:26Z","updated_at":"2018-06-07T12:12:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0d9fb0273cc486ae53b800bb1da7f51ba1b659c0","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":142814844,"node_id":"MDU6TGFiZWwxNDI4MTQ4NDQ=","url":"https://api.github.com/repos/cn-uofbasel/ccn-lite/labels/minor","name":"minor","color":"c7def8","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/cn-uofbasel/ccn-lite/pulls/266/commits","review_comments_url":"https://api.github.com/repos/cn-uofbasel/ccn-lite/pulls/266/comments","review_comment_url":"https://api.github.com/repos/cn-uofbasel/ccn-lite/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cn-uofbasel/ccn-lite/issues/266/comments","statuses_url":"https://api.github.com/repos/cn-uofbasel/ccn-lite/statuses/ce5ede2af6bcf131510d018cbf021590f42ad85f","head":{"label":"mfrey:ccnl_content_add2cache-fix","ref":"ccnl_content_add2cache-fix","sha":"ce5ede2af6bcf131510d018cbf021590f42ad85f","user":{"login":"mfrey","id":237157,"node_id":"MDQ6VXNlcjIzNzE1Nw==","avatar_url":"https://avatars1.githubusercontent.com/u/237157?v=4","gravatar_id":"","url":"https://api.github.com/users/mfrey","html_url":"https://github.com/mfrey","followers_url":"https://api.github.com/users/mfrey/followers","following_url":"https://api.github.com/users/mfrey/following{/other_user}","gists_url":"https://api.github.com/users/mfrey/gists{/gist_id}","starred_url":"https://api.github.com/users/mfrey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mfrey/subscriptions","organizations_url":"https://api.github.com/users/mfrey/orgs","repos_url":"https://api.github.com/users/mfrey/repos","events_url":"https://api.github.com/users/mfrey/events{/privacy}","received_events_url":"https://api.github.com/users/mfrey/received_events","type":"User","site_admin":false},"repo":{"id":110825037,"node_id":"MDEwOlJlcG9zaXRvcnkxMTA4MjUwMzc=","name":"ccn-lite","full_name":"mfrey/ccn-lite","owner":{"login":"mfrey","id":237157,"node_id":"MDQ6VXNlcjIzNzE1Nw==","avatar_url":"https://avatars1.githubusercontent.com/u/237157?v=4","gravatar_id":"","url":"https://api.github.com/users/mfrey","html_url":"https://github.com/mfrey","followers_url":"https://api.github.com/users/mfrey/followers","following_url":"https://api.github.com/users/mfrey/following{/other_user}","gists_url":"https://api.github.com/users/mfrey/gists{/gist_id}","starred_url":"https://api.github.com/users/mfrey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mfrey/subscriptions","organizations_url":"https://api.github.com/users/mfrey/orgs","repos_url":"https://api.github.com/users/mfrey/repos","events_url":"https://api.github.com/users/mfrey/events{/privacy}","received_events_url":"https://api.github.com/users/mfrey/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mfrey/ccn-lite","description":"CCN-lite, a lightweight implementation of the CCNx protocol and its variations","fork":true,"url":"https://api.github.com/repos/mfrey/ccn-lite","forks_url":"https://api.github.com/repos/mfrey/ccn-lite/forks","keys_url":"https://api.github.com/repos/mfrey/ccn-lite/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mfrey/ccn-lite/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mfrey/ccn-lite/teams","hooks_url":"https://api.github.com/repos/mfrey/ccn-lite/hooks","issue_events_url":"https://api.github.com/repos/mfrey/ccn-lite/issues/events{/number}","events_url":"https://api.github.com/repos/mfrey/ccn-lite/events","assignees_url":"https://api.github.com/repos/mfrey/ccn-lite/assignees{/user}","branches_url":"https://api.github.com/repos/mfrey/ccn-lite/branches{/branch}","tags_url":"https://api.github.com/repos/mfrey/ccn-lite/tags","blobs_url":"https://api.github.com/repos/mfrey/ccn-lite/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mfrey/ccn-lite/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mfrey/ccn-lite/git/refs{/sha}","trees_url":"https://api.github.com/repos/mfrey/ccn-lite/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mfrey/ccn-lite/statuses/{sha}","languages_url":"https://api.github.com/repos/mfrey/ccn-lite/languages","stargazers_url":"https://api.github.com/repos/mfrey/ccn-lite/stargazers","contributors_url":"https://api.github.com/repos/mfrey/ccn-lite/contributors","subscribers_url":"https://api.github.com/repos/mfrey/ccn-lite/subscribers","subscription_url":"https://api.github.com/repos/mfrey/ccn-lite/subscription","commits_url":"https://api.github.com/repos/mfrey/ccn-lite/commits{/sha}","git_commits_url":"https://api.github.com/repos/mfrey/ccn-lite/git/commits{/sha}","comments_url":"https://api.github.com/repos/mfrey/ccn-lite/comments{/number}","issue_comment_url":"https://api.github.com/repos/mfrey/ccn-lite/issues/comments{/number}","contents_url":"https://api.github.com/repos/mfrey/ccn-lite/contents/{+path}","compare_url":"https://api.github.com/repos/mfrey/ccn-lite/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mfrey/ccn-lite/merges","archive_url":"https://api.github.com/repos/mfrey/ccn-lite/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mfrey/ccn-lite/downloads","issues_url":"https://api.github.com/repos/mfrey/ccn-lite/issues{/number}","pulls_url":"https://api.github.com/repos/mfrey/ccn-lite/pulls{/number}","milestones_url":"https://api.github.com/repos/mfrey/ccn-lite/milestones{/number}","notifications_url":"https://api.github.com/repos/mfrey/ccn-lite/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mfrey/ccn-lite/labels{/name}","releases_url":"https://api.github.com/repos/mfrey/ccn-lite/releases{/id}","deployments_url":"https://api.github.com/repos/mfrey/ccn-lite/deployments","created_at":"2017-11-15T11:31:23Z","updated_at":"2018-05-24T15:18:16Z","pushed_at":"2018-06-07T10:39:38Z","git_url":"git://github.com/mfrey/ccn-lite.git","ssh_url":"git@github.com:mfrey/ccn-lite.git","clone_url":"https://github.com/mfrey/ccn-lite.git","svn_url":"https://github.com/mfrey/ccn-lite","homepage":"","size":16104,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"isc","name":"ISC License","spdx_id":"ISC","url":"https://api.github.com/licenses/isc","node_id":"MDc6TGljZW5zZTEw"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"cn-uofbasel:master","ref":"master","sha":"f97f58eb5ac4ab48300faa1218409d1ad86be741","user":{"login":"cn-uofbasel","id":3949801,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5NDk4MDE=","avatar_url":"https://avatars0.githubusercontent.com/u/3949801?v=4","gravatar_id":"","url":"https://api.github.com/users/cn-uofbasel","html_url":"https://github.com/cn-uofbasel","followers_url":"https://api.github.com/users/cn-uofbasel/followers","following_url":"https://api.github.com/users/cn-uofbasel/following{/other_user}","gists_url":"https://api.github.com/users/cn-uofbasel/gists{/gist_id}","starred_url":"https://api.github.com/users/cn-uofbasel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cn-uofbasel/subscriptions","organizations_url":"https://api.github.com/users/cn-uofbasel/orgs","repos_url":"https://api.github.com/users/cn-uofbasel/repos","events_url":"https://api.github.com/users/cn-uofbasel/events{/privacy}","received_events_url":"https://api.github.com/users/cn-uofbasel/received_events","type":"Organization","site_admin":false},"repo":{"id":8971938,"node_id":"MDEwOlJlcG9zaXRvcnk4OTcxOTM4","name":"ccn-lite","full_name":"cn-uofbasel/ccn-lite","owner":{"login":"cn-uofbasel","id":3949801,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5NDk4MDE=","avatar_url":"https://avatars0.githubusercontent.com/u/3949801?v=4","gravatar_id":"","url":"https://api.github.com/users/cn-uofbasel","html_url":"https://github.com/cn-uofbasel","followers_url":"https://api.github.com/users/cn-uofbasel/followers","following_url":"https://api.github.com/users/cn-uofbasel/following{/other_user}","gists_url":"https://api.github.com/users/cn-uofbasel/gists{/gist_id}","starred_url":"https://api.github.com/users/cn-uofbasel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cn-uofbasel/subscriptions","organizations_url":"https://api.github.com/users/cn-uofbasel/orgs","repos_url":"https://api.github.com/users/cn-uofbasel/repos","events_url":"https://api.github.com/users/cn-uofbasel/events{/privacy}","received_events_url":"https://api.github.com/users/cn-uofbasel/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cn-uofbasel/ccn-lite","description":"CCN-lite, a lightweight implementation of the CCNx protocol and its variations","fork":false,"url":"https://api.github.com/repos/cn-uofbasel/ccn-lite","forks_url":"https://api.github.com/repos/cn-uofbasel/ccn-lite/forks","keys_url":"https://api.github.com/repos/cn-uofbasel/ccn-lite/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cn-uofbasel/ccn-lite/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cn-uofbasel/ccn-lite/teams","hooks_url":"https://api.github.com/repos/cn-uofbasel/ccn-lite/hooks","issue_events_url":"https://api.github.com/repos/cn-uofbasel/ccn-lite/issues/events{/number}","events_url":"https://api.github.com/repos/cn-uofbasel/ccn-lite/events","assignees_url":"https://api.github.com/repos/cn-uofbasel/ccn-lite/assignees{/user}","branches_url":"https://api.github.com/repos/cn-uofbasel/ccn-lite/branches{/branch}","tags_url":"https://api.github.com/repos/cn-uofbasel/ccn-lite/tags","blobs_url":"https://api.github.com/repos/cn-uofbasel/ccn-lite/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cn-uofbasel/ccn-lite/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cn-uofbasel/ccn-lite/git/refs{/sha}","trees_url":"https://api.github.com/repos/cn-uofbasel/ccn-lite/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cn-uofbasel/ccn-lite/statuses/{sha}","languages_url":"https://api.github.com/repos/cn-uofbasel/ccn-lite/languages","stargazers_url":"https://api.github.com/repos/cn-uofbasel/ccn-lite/stargazers","contributors_url":"https://api.github.com/repos/cn-uofbasel/ccn-lite/contributors","subscribers_url":"https://api.github.com/repos/cn-uofbasel/ccn-lite/subscribers","subscription_url":"https://api.github.com/repos/cn-uofbasel/ccn-lite/subscription","commits_url":"https://api.github.com/repos/cn-uofbasel/ccn-lite/commits{/sha}","git_commits_url":"https://api.github.com/repos/cn-uofbasel/ccn-lite/git/commits{/sha}","comments_url":"https://api.github.com/repos/cn-uofbasel/ccn-lite/comments{/number}","issue_comment_url":"https://api.github.com/repos/cn-uofbasel/ccn-lite/issues/comments{/number}","contents_url":"https://api.github.com/repos/cn-uofbasel/ccn-lite/contents/{+path}","compare_url":"https://api.github.com/repos/cn-uofbasel/ccn-lite/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cn-uofbasel/ccn-lite/merges","archive_url":"https://api.github.com/repos/cn-uofbasel/ccn-lite/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cn-uofbasel/ccn-lite/downloads","issues_url":"https://api.github.com/repos/cn-uofbasel/ccn-lite/issues{/number}","pulls_url":"https://api.github.com/repos/cn-uofbasel/ccn-lite/pulls{/number}","milestones_url":"https://api.github.com/repos/cn-uofbasel/ccn-lite/milestones{/number}","notifications_url":"https://api.github.com/repos/cn-uofbasel/ccn-lite/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cn-uofbasel/ccn-lite/labels{/name}","releases_url":"https://api.github.com/repos/cn-uofbasel/ccn-lite/releases{/id}","deployments_url":"https://api.github.com/repos/cn-uofbasel/ccn-lite/deployments","created_at":"2013-03-23T15:03:00Z","updated_at":"2018-05-30T09:05:27Z","pushed_at":"2018-06-07T10:45:27Z","git_url":"git://github.com/cn-uofbasel/ccn-lite.git","ssh_url":"git@github.com:cn-uofbasel/ccn-lite.git","clone_url":"https://github.com/cn-uofbasel/ccn-lite.git","svn_url":"https://github.com/cn-uofbasel/ccn-lite","homepage":"","size":16023,"stargazers_count":46,"watchers_count":46,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":36,"mirror_url":null,"archived":false,"open_issues_count":46,"license":{"key":"isc","name":"ISC License","spdx_id":"ISC","url":"https://api.github.com/licenses/isc","node_id":"MDc6TGljZW5zZTEw"},"forks":36,"open_issues":46,"watchers":46,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cn-uofbasel/ccn-lite/pulls/266"},"html":{"href":"https://github.com/cn-uofbasel/ccn-lite/pull/266"},"issue":{"href":"https://api.github.com/repos/cn-uofbasel/ccn-lite/issues/266"},"comments":{"href":"https://api.github.com/repos/cn-uofbasel/ccn-lite/issues/266/comments"},"review_comments":{"href":"https://api.github.com/repos/cn-uofbasel/ccn-lite/pulls/266/comments"},"review_comment":{"href":"https://api.github.com/repos/cn-uofbasel/ccn-lite/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cn-uofbasel/ccn-lite/pulls/266/commits"},"statuses":{"href":"https://api.github.com/repos/cn-uofbasel/ccn-lite/statuses/ce5ede2af6bcf131510d018cbf021590f42ad85f"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"mfrey"}}