{"action":"created","comment":{"url":"https://api.github.com/repos/alfredh/baresip/pulls/comments/125345391","pull_request_review_id":47726206,"id":125345391,"diff_hunk":"@@ -280,6 +280,45 @@ static int presence_alloc(struct contact *contact)\n \treturn 0;\n }\n \n+static void presence_dealloc(struct presence* pres)\n+{\n+\tlist_unlink(&pres->le);\n+\ttmr_cancel(&pres->tmr);\n+\tmem_deref(pres->contact);\n+}\n+\n+static void contact_handler(struct contact* contact,\n+\t\t\t\tbool remove, void* arg)\n+{\n+\tstruct le* le;\n+\tstruct presence *pres;\n+\n+\tif (!remove) {\n+\t\tstruct sip_addr *addr = contact_addr(contact);\n+\t\tstruct pl val;\n+\n+\t\tif (0 == msg_param_decode(&addr->params, \"presence\", &val) &&\n+\t\t0 == pl_strcasecmp(&val, \"p2p\")) {\n+\t\t\tpresence_alloc(contact);","path":"modules/presence/subscriber.c","position":23,"original_position":23,"commit_id":"94862d93e2f98fcbe9b473b8a7709891ad81093e","original_commit_id":"94862d93e2f98fcbe9b473b8a7709891ad81093e","user":{"login":"alfredh","id":114750,"avatar_url":"https://avatars2.githubusercontent.com/u/114750?v=3","gravatar_id":"","url":"https://api.github.com/users/alfredh","html_url":"https://github.com/alfredh","followers_url":"https://api.github.com/users/alfredh/followers","following_url":"https://api.github.com/users/alfredh/following{/other_user}","gists_url":"https://api.github.com/users/alfredh/gists{/gist_id}","starred_url":"https://api.github.com/users/alfredh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alfredh/subscriptions","organizations_url":"https://api.github.com/users/alfredh/orgs","repos_url":"https://api.github.com/users/alfredh/repos","events_url":"https://api.github.com/users/alfredh/events{/privacy}","received_events_url":"https://api.github.com/users/alfredh/received_events","type":"User","site_admin":false},"body":"return value from `presence_alloc` must be checked and handled.\r\n","created_at":"2017-07-03T19:08:28Z","updated_at":"2017-07-03T19:08:28Z","html_url":"https://github.com/alfredh/baresip/pull/276#discussion_r125345391","pull_request_url":"https://api.github.com/repos/alfredh/baresip/pulls/276","_links":{"self":{"href":"https://api.github.com/repos/alfredh/baresip/pulls/comments/125345391"},"html":{"href":"https://github.com/alfredh/baresip/pull/276#discussion_r125345391"},"pull_request":{"href":"https://api.github.com/repos/alfredh/baresip/pulls/276"}}},"pull_request":{"url":"https://api.github.com/repos/alfredh/baresip/pulls/276","id":128531379,"html_url":"https://github.com/alfredh/baresip/pull/276","diff_url":"https://github.com/alfredh/baresip/pull/276.diff","patch_url":"https://github.com/alfredh/baresip/pull/276.patch","issue_url":"https://api.github.com/repos/alfredh/baresip/issues/276","number":276,"state":"open","locked":false,"title":"Presence: Handle contacts added at run-time","user":{"login":"strfry","id":1341440,"avatar_url":"https://avatars0.githubusercontent.com/u/1341440?v=3","gravatar_id":"","url":"https://api.github.com/users/strfry","html_url":"https://github.com/strfry","followers_url":"https://api.github.com/users/strfry/followers","following_url":"https://api.github.com/users/strfry/following{/other_user}","gists_url":"https://api.github.com/users/strfry/gists{/gist_id}","starred_url":"https://api.github.com/users/strfry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strfry/subscriptions","organizations_url":"https://api.github.com/users/strfry/orgs","repos_url":"https://api.github.com/users/strfry/repos","events_url":"https://api.github.com/users/strfry/events{/privacy}","received_events_url":"https://api.github.com/users/strfry/received_events","type":"User","site_admin":false},"body":"Preliminary work for avahi/Zeroconf support","created_at":"2017-07-02T19:32:40Z","updated_at":"2017-07-03T19:08:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3022303efe2b6d491ea203609b6dcd7fe0ab174c","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/alfredh/baresip/pulls/276/commits","review_comments_url":"https://api.github.com/repos/alfredh/baresip/pulls/276/comments","review_comment_url":"https://api.github.com/repos/alfredh/baresip/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alfredh/baresip/issues/276/comments","statuses_url":"https://api.github.com/repos/alfredh/baresip/statuses/94862d93e2f98fcbe9b473b8a7709891ad81093e","head":{"label":"strfry:presence","ref":"presence","sha":"94862d93e2f98fcbe9b473b8a7709891ad81093e","user":{"login":"strfry","id":1341440,"avatar_url":"https://avatars0.githubusercontent.com/u/1341440?v=3","gravatar_id":"","url":"https://api.github.com/users/strfry","html_url":"https://github.com/strfry","followers_url":"https://api.github.com/users/strfry/followers","following_url":"https://api.github.com/users/strfry/following{/other_user}","gists_url":"https://api.github.com/users/strfry/gists{/gist_id}","starred_url":"https://api.github.com/users/strfry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strfry/subscriptions","organizations_url":"https://api.github.com/users/strfry/orgs","repos_url":"https://api.github.com/users/strfry/repos","events_url":"https://api.github.com/users/strfry/events{/privacy}","received_events_url":"https://api.github.com/users/strfry/received_events","type":"User","site_admin":false},"repo":{"id":90696773,"name":"baresip","full_name":"strfry/baresip","owner":{"login":"strfry","id":1341440,"avatar_url":"https://avatars0.githubusercontent.com/u/1341440?v=3","gravatar_id":"","url":"https://api.github.com/users/strfry","html_url":"https://github.com/strfry","followers_url":"https://api.github.com/users/strfry/followers","following_url":"https://api.github.com/users/strfry/following{/other_user}","gists_url":"https://api.github.com/users/strfry/gists{/gist_id}","starred_url":"https://api.github.com/users/strfry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strfry/subscriptions","organizations_url":"https://api.github.com/users/strfry/orgs","repos_url":"https://api.github.com/users/strfry/repos","events_url":"https://api.github.com/users/strfry/events{/privacy}","received_events_url":"https://api.github.com/users/strfry/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/strfry/baresip","description":"Baresip is a modular SIP User-Agent with audio and video support","fork":true,"url":"https://api.github.com/repos/strfry/baresip","forks_url":"https://api.github.com/repos/strfry/baresip/forks","keys_url":"https://api.github.com/repos/strfry/baresip/keys{/key_id}","collaborators_url":"https://api.github.com/repos/strfry/baresip/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/strfry/baresip/teams","hooks_url":"https://api.github.com/repos/strfry/baresip/hooks","issue_events_url":"https://api.github.com/repos/strfry/baresip/issues/events{/number}","events_url":"https://api.github.com/repos/strfry/baresip/events","assignees_url":"https://api.github.com/repos/strfry/baresip/assignees{/user}","branches_url":"https://api.github.com/repos/strfry/baresip/branches{/branch}","tags_url":"https://api.github.com/repos/strfry/baresip/tags","blobs_url":"https://api.github.com/repos/strfry/baresip/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/strfry/baresip/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/strfry/baresip/git/refs{/sha}","trees_url":"https://api.github.com/repos/strfry/baresip/git/trees{/sha}","statuses_url":"https://api.github.com/repos/strfry/baresip/statuses/{sha}","languages_url":"https://api.github.com/repos/strfry/baresip/languages","stargazers_url":"https://api.github.com/repos/strfry/baresip/stargazers","contributors_url":"https://api.github.com/repos/strfry/baresip/contributors","subscribers_url":"https://api.github.com/repos/strfry/baresip/subscribers","subscription_url":"https://api.github.com/repos/strfry/baresip/subscription","commits_url":"https://api.github.com/repos/strfry/baresip/commits{/sha}","git_commits_url":"https://api.github.com/repos/strfry/baresip/git/commits{/sha}","comments_url":"https://api.github.com/repos/strfry/baresip/comments{/number}","issue_comment_url":"https://api.github.com/repos/strfry/baresip/issues/comments{/number}","contents_url":"https://api.github.com/repos/strfry/baresip/contents/{+path}","compare_url":"https://api.github.com/repos/strfry/baresip/compare/{base}...{head}","merges_url":"https://api.github.com/repos/strfry/baresip/merges","archive_url":"https://api.github.com/repos/strfry/baresip/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/strfry/baresip/downloads","issues_url":"https://api.github.com/repos/strfry/baresip/issues{/number}","pulls_url":"https://api.github.com/repos/strfry/baresip/pulls{/number}","milestones_url":"https://api.github.com/repos/strfry/baresip/milestones{/number}","notifications_url":"https://api.github.com/repos/strfry/baresip/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/strfry/baresip/labels{/name}","releases_url":"https://api.github.com/repos/strfry/baresip/releases{/id}","deployments_url":"https://api.github.com/repos/strfry/baresip/deployments","created_at":"2017-05-09T03:07:37Z","updated_at":"2017-05-09T03:07:39Z","pushed_at":"2017-07-02T21:41:12Z","git_url":"git://github.com/strfry/baresip.git","ssh_url":"git@github.com:strfry/baresip.git","clone_url":"https://github.com/strfry/baresip.git","svn_url":"https://github.com/strfry/baresip","homepage":"http://creytiv.com/baresip.html","size":1858,"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,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"alfredh:master","ref":"master","sha":"006aa0baca64fed6e85c816ba67cc9c30e2cd6b4","user":{"login":"alfredh","id":114750,"avatar_url":"https://avatars2.githubusercontent.com/u/114750?v=3","gravatar_id":"","url":"https://api.github.com/users/alfredh","html_url":"https://github.com/alfredh","followers_url":"https://api.github.com/users/alfredh/followers","following_url":"https://api.github.com/users/alfredh/following{/other_user}","gists_url":"https://api.github.com/users/alfredh/gists{/gist_id}","starred_url":"https://api.github.com/users/alfredh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alfredh/subscriptions","organizations_url":"https://api.github.com/users/alfredh/orgs","repos_url":"https://api.github.com/users/alfredh/repos","events_url":"https://api.github.com/users/alfredh/events{/privacy}","received_events_url":"https://api.github.com/users/alfredh/received_events","type":"User","site_admin":false},"repo":{"id":16664594,"name":"baresip","full_name":"alfredh/baresip","owner":{"login":"alfredh","id":114750,"avatar_url":"https://avatars2.githubusercontent.com/u/114750?v=3","gravatar_id":"","url":"https://api.github.com/users/alfredh","html_url":"https://github.com/alfredh","followers_url":"https://api.github.com/users/alfredh/followers","following_url":"https://api.github.com/users/alfredh/following{/other_user}","gists_url":"https://api.github.com/users/alfredh/gists{/gist_id}","starred_url":"https://api.github.com/users/alfredh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alfredh/subscriptions","organizations_url":"https://api.github.com/users/alfredh/orgs","repos_url":"https://api.github.com/users/alfredh/repos","events_url":"https://api.github.com/users/alfredh/events{/privacy}","received_events_url":"https://api.github.com/users/alfredh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/alfredh/baresip","description":"Baresip is a modular SIP User-Agent with audio and video support","fork":false,"url":"https://api.github.com/repos/alfredh/baresip","forks_url":"https://api.github.com/repos/alfredh/baresip/forks","keys_url":"https://api.github.com/repos/alfredh/baresip/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alfredh/baresip/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alfredh/baresip/teams","hooks_url":"https://api.github.com/repos/alfredh/baresip/hooks","issue_events_url":"https://api.github.com/repos/alfredh/baresip/issues/events{/number}","events_url":"https://api.github.com/repos/alfredh/baresip/events","assignees_url":"https://api.github.com/repos/alfredh/baresip/assignees{/user}","branches_url":"https://api.github.com/repos/alfredh/baresip/branches{/branch}","tags_url":"https://api.github.com/repos/alfredh/baresip/tags","blobs_url":"https://api.github.com/repos/alfredh/baresip/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alfredh/baresip/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alfredh/baresip/git/refs{/sha}","trees_url":"https://api.github.com/repos/alfredh/baresip/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alfredh/baresip/statuses/{sha}","languages_url":"https://api.github.com/repos/alfredh/baresip/languages","stargazers_url":"https://api.github.com/repos/alfredh/baresip/stargazers","contributors_url":"https://api.github.com/repos/alfredh/baresip/contributors","subscribers_url":"https://api.github.com/repos/alfredh/baresip/subscribers","subscription_url":"https://api.github.com/repos/alfredh/baresip/subscription","commits_url":"https://api.github.com/repos/alfredh/baresip/commits{/sha}","git_commits_url":"https://api.github.com/repos/alfredh/baresip/git/commits{/sha}","comments_url":"https://api.github.com/repos/alfredh/baresip/comments{/number}","issue_comment_url":"https://api.github.com/repos/alfredh/baresip/issues/comments{/number}","contents_url":"https://api.github.com/repos/alfredh/baresip/contents/{+path}","compare_url":"https://api.github.com/repos/alfredh/baresip/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alfredh/baresip/merges","archive_url":"https://api.github.com/repos/alfredh/baresip/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alfredh/baresip/downloads","issues_url":"https://api.github.com/repos/alfredh/baresip/issues{/number}","pulls_url":"https://api.github.com/repos/alfredh/baresip/pulls{/number}","milestones_url":"https://api.github.com/repos/alfredh/baresip/milestones{/number}","notifications_url":"https://api.github.com/repos/alfredh/baresip/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alfredh/baresip/labels{/name}","releases_url":"https://api.github.com/repos/alfredh/baresip/releases{/id}","deployments_url":"https://api.github.com/repos/alfredh/baresip/deployments","created_at":"2014-02-09T10:44:09Z","updated_at":"2017-06-27T19:22:03Z","pushed_at":"2017-07-02T19:32:41Z","git_url":"git://github.com/alfredh/baresip.git","ssh_url":"git@github.com:alfredh/baresip.git","clone_url":"https://github.com/alfredh/baresip.git","svn_url":"https://github.com/alfredh/baresip","homepage":"http://creytiv.com/baresip.html","size":1853,"stargazers_count":193,"watchers_count":193,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":83,"mirror_url":null,"open_issues_count":7,"forks":83,"open_issues":7,"watchers":193,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alfredh/baresip/pulls/276"},"html":{"href":"https://github.com/alfredh/baresip/pull/276"},"issue":{"href":"https://api.github.com/repos/alfredh/baresip/issues/276"},"comments":{"href":"https://api.github.com/repos/alfredh/baresip/issues/276/comments"},"review_comments":{"href":"https://api.github.com/repos/alfredh/baresip/pulls/276/comments"},"review_comment":{"href":"https://api.github.com/repos/alfredh/baresip/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alfredh/baresip/pulls/276/commits"},"statuses":{"href":"https://api.github.com/repos/alfredh/baresip/statuses/94862d93e2f98fcbe9b473b8a7709891ad81093e"}}}}
{"actor":{"display_login":"alfredh"}}