{"action":"created","comment":{"url":"https://api.github.com/repos/Metaswitch/sprout/pulls/comments/82389656","pull_request_review_id":3302005,"id":82389656,"diff_hunk":"@@ -1681,7 +1681,8 @@ static void proxy_process_register_response(pjsip_rx_data* rdata)\n         // in 5 minutes (300s).  This should never happens as it means the\n         // registrar is misbehaving, but we defensively assume a short expiry\n         // time as this is more secure.\n-        int max_expires = PJUtils::max_expires(rdata->msg_info.msg, 300);\n+        int max_expires;","path":"src/bono.cpp","position":5,"original_position":5,"commit_id":"1fe94f488957ee5596b251afa6d7ed65c28c143b","original_commit_id":"1fe94f488957ee5596b251afa6d7ed65c28c143b","user":{"login":"AlexHockey","id":4903205,"avatar_url":"https://avatars.githubusercontent.com/u/4903205?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexHockey","html_url":"https://github.com/AlexHockey","followers_url":"https://api.github.com/users/AlexHockey/followers","following_url":"https://api.github.com/users/AlexHockey/following{/other_user}","gists_url":"https://api.github.com/users/AlexHockey/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexHockey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexHockey/subscriptions","organizations_url":"https://api.github.com/users/AlexHockey/orgs","repos_url":"https://api.github.com/users/AlexHockey/repos","events_url":"https://api.github.com/users/AlexHockey/events{/privacy}","received_events_url":"https://api.github.com/users/AlexHockey/received_events","type":"User","site_admin":false},"body":"I was about to suggest initializing max_expires to 300, but now I realize that will have no effect, so no change needed. Sorry for the thinking out loud. ","created_at":"2016-10-07T13:36:36Z","updated_at":"2016-10-07T13:36:37Z","html_url":"https://github.com/Metaswitch/sprout/pull/1551#discussion_r82389656","pull_request_url":"https://api.github.com/repos/Metaswitch/sprout/pulls/1551","_links":{"self":{"href":"https://api.github.com/repos/Metaswitch/sprout/pulls/comments/82389656"},"html":{"href":"https://github.com/Metaswitch/sprout/pull/1551#discussion_r82389656"},"pull_request":{"href":"https://api.github.com/repos/Metaswitch/sprout/pulls/1551"}}},"pull_request":{"url":"https://api.github.com/repos/Metaswitch/sprout/pulls/1551","id":87293646,"html_url":"https://github.com/Metaswitch/sprout/pull/1551","diff_url":"https://github.com/Metaswitch/sprout/pull/1551.diff","patch_url":"https://github.com/Metaswitch/sprout/pull/1551.patch","issue_url":"https://api.github.com/repos/Metaswitch/sprout/issues/1551","number":1551,"state":"open","locked":false,"title":"[Reviewer AJH] 'Fetch binding' REGISTERs","user":{"login":"steelyvoid","id":8615257,"avatar_url":"https://avatars.githubusercontent.com/u/8615257?v=3","gravatar_id":"","url":"https://api.github.com/users/steelyvoid","html_url":"https://github.com/steelyvoid","followers_url":"https://api.github.com/users/steelyvoid/followers","following_url":"https://api.github.com/users/steelyvoid/following{/other_user}","gists_url":"https://api.github.com/users/steelyvoid/gists{/gist_id}","starred_url":"https://api.github.com/users/steelyvoid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steelyvoid/subscriptions","organizations_url":"https://api.github.com/users/steelyvoid/orgs","repos_url":"https://api.github.com/users/steelyvoid/repos","events_url":"https://api.github.com/users/steelyvoid/events{/privacy}","received_events_url":"https://api.github.com/users/steelyvoid/received_events","type":"User","site_admin":false},"body":"This PR adds support for \"Fetch binding\" REGISTERs - i.e. REGISTERs that don't include Contact headers - for which the registrar is supposed to respond (after authentication) with the current binding list _without_ actually performing a  REGISTER.  Support for these is specifically mentioned in TS24.229 (in chapter 5.1.1.4.1, it states:\r\n\"The UE can fetch bindings as defined in RFC 3261 [26] at any time after the initial registration has been completed. The procedure for fetching bindings is the same as for a reregistration except that the REGISTER request does not contain a Contact header field.\")\r\n\r\nThe fix adds support for Contact-less REGISTERs.  In addition, while adding UTs to cover the (previously uncovered) existing code between https://github.com/Metaswitch/sprout/blob/dev/src/registrar.cpp#L266 and https://github.com/Metaswitch/sprout/blob/dev/src/registrar.cpp#L333 (which I was cribbing for my own code and therefore needed to cover anyway), I found a bug in the code that copies AoR bindings from the backup AoRPair and the target AoRPair (the later deletion of the former caused storage pointed to by the latter to be release).  I fixed this and refactored the code to ensure that it got covered by all UTs.\r\n\r\nI've also tested the fix live, ensuring that bindings are returned as expected both for IRSes with bindings and for IRSes without bindings","created_at":"2016-09-29T11:23:56Z","updated_at":"2016-10-07T13:36:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"520f25524aedb4a6d2f29c0455b17cc73aa8888a","assignee":{"login":"steelyvoid","id":8615257,"avatar_url":"https://avatars.githubusercontent.com/u/8615257?v=3","gravatar_id":"","url":"https://api.github.com/users/steelyvoid","html_url":"https://github.com/steelyvoid","followers_url":"https://api.github.com/users/steelyvoid/followers","following_url":"https://api.github.com/users/steelyvoid/following{/other_user}","gists_url":"https://api.github.com/users/steelyvoid/gists{/gist_id}","starred_url":"https://api.github.com/users/steelyvoid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steelyvoid/subscriptions","organizations_url":"https://api.github.com/users/steelyvoid/orgs","repos_url":"https://api.github.com/users/steelyvoid/repos","events_url":"https://api.github.com/users/steelyvoid/events{/privacy}","received_events_url":"https://api.github.com/users/steelyvoid/received_events","type":"User","site_admin":false},"assignees":[{"login":"steelyvoid","id":8615257,"avatar_url":"https://avatars.githubusercontent.com/u/8615257?v=3","gravatar_id":"","url":"https://api.github.com/users/steelyvoid","html_url":"https://github.com/steelyvoid","followers_url":"https://api.github.com/users/steelyvoid/followers","following_url":"https://api.github.com/users/steelyvoid/following{/other_user}","gists_url":"https://api.github.com/users/steelyvoid/gists{/gist_id}","starred_url":"https://api.github.com/users/steelyvoid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steelyvoid/subscriptions","organizations_url":"https://api.github.com/users/steelyvoid/orgs","repos_url":"https://api.github.com/users/steelyvoid/repos","events_url":"https://api.github.com/users/steelyvoid/events{/privacy}","received_events_url":"https://api.github.com/users/steelyvoid/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/Metaswitch/sprout/pulls/1551/commits","review_comments_url":"https://api.github.com/repos/Metaswitch/sprout/pulls/1551/comments","review_comment_url":"https://api.github.com/repos/Metaswitch/sprout/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Metaswitch/sprout/issues/1551/comments","statuses_url":"https://api.github.com/repos/Metaswitch/sprout/statuses/1fe94f488957ee5596b251afa6d7ed65c28c143b","head":{"label":"Metaswitch:fetch_binding_registers","ref":"fetch_binding_registers","sha":"1fe94f488957ee5596b251afa6d7ed65c28c143b","user":{"login":"Metaswitch","id":453759,"avatar_url":"https://avatars.githubusercontent.com/u/453759?v=3","gravatar_id":"","url":"https://api.github.com/users/Metaswitch","html_url":"https://github.com/Metaswitch","followers_url":"https://api.github.com/users/Metaswitch/followers","following_url":"https://api.github.com/users/Metaswitch/following{/other_user}","gists_url":"https://api.github.com/users/Metaswitch/gists{/gist_id}","starred_url":"https://api.github.com/users/Metaswitch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Metaswitch/subscriptions","organizations_url":"https://api.github.com/users/Metaswitch/orgs","repos_url":"https://api.github.com/users/Metaswitch/repos","events_url":"https://api.github.com/users/Metaswitch/events{/privacy}","received_events_url":"https://api.github.com/users/Metaswitch/received_events","type":"Organization","site_admin":false},"repo":{"id":9887542,"name":"sprout","full_name":"Metaswitch/sprout","owner":{"login":"Metaswitch","id":453759,"avatar_url":"https://avatars.githubusercontent.com/u/453759?v=3","gravatar_id":"","url":"https://api.github.com/users/Metaswitch","html_url":"https://github.com/Metaswitch","followers_url":"https://api.github.com/users/Metaswitch/followers","following_url":"https://api.github.com/users/Metaswitch/following{/other_user}","gists_url":"https://api.github.com/users/Metaswitch/gists{/gist_id}","starred_url":"https://api.github.com/users/Metaswitch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Metaswitch/subscriptions","organizations_url":"https://api.github.com/users/Metaswitch/orgs","repos_url":"https://api.github.com/users/Metaswitch/repos","events_url":"https://api.github.com/users/Metaswitch/events{/privacy}","received_events_url":"https://api.github.com/users/Metaswitch/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Metaswitch/sprout","description":"sprout and bono, the Clearwater SIP router and edge proxy","fork":false,"url":"https://api.github.com/repos/Metaswitch/sprout","forks_url":"https://api.github.com/repos/Metaswitch/sprout/forks","keys_url":"https://api.github.com/repos/Metaswitch/sprout/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Metaswitch/sprout/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Metaswitch/sprout/teams","hooks_url":"https://api.github.com/repos/Metaswitch/sprout/hooks","issue_events_url":"https://api.github.com/repos/Metaswitch/sprout/issues/events{/number}","events_url":"https://api.github.com/repos/Metaswitch/sprout/events","assignees_url":"https://api.github.com/repos/Metaswitch/sprout/assignees{/user}","branches_url":"https://api.github.com/repos/Metaswitch/sprout/branches{/branch}","tags_url":"https://api.github.com/repos/Metaswitch/sprout/tags","blobs_url":"https://api.github.com/repos/Metaswitch/sprout/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Metaswitch/sprout/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Metaswitch/sprout/git/refs{/sha}","trees_url":"https://api.github.com/repos/Metaswitch/sprout/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Metaswitch/sprout/statuses/{sha}","languages_url":"https://api.github.com/repos/Metaswitch/sprout/languages","stargazers_url":"https://api.github.com/repos/Metaswitch/sprout/stargazers","contributors_url":"https://api.github.com/repos/Metaswitch/sprout/contributors","subscribers_url":"https://api.github.com/repos/Metaswitch/sprout/subscribers","subscription_url":"https://api.github.com/repos/Metaswitch/sprout/subscription","commits_url":"https://api.github.com/repos/Metaswitch/sprout/commits{/sha}","git_commits_url":"https://api.github.com/repos/Metaswitch/sprout/git/commits{/sha}","comments_url":"https://api.github.com/repos/Metaswitch/sprout/comments{/number}","issue_comment_url":"https://api.github.com/repos/Metaswitch/sprout/issues/comments{/number}","contents_url":"https://api.github.com/repos/Metaswitch/sprout/contents/{+path}","compare_url":"https://api.github.com/repos/Metaswitch/sprout/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Metaswitch/sprout/merges","archive_url":"https://api.github.com/repos/Metaswitch/sprout/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Metaswitch/sprout/downloads","issues_url":"https://api.github.com/repos/Metaswitch/sprout/issues{/number}","pulls_url":"https://api.github.com/repos/Metaswitch/sprout/pulls{/number}","milestones_url":"https://api.github.com/repos/Metaswitch/sprout/milestones{/number}","notifications_url":"https://api.github.com/repos/Metaswitch/sprout/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Metaswitch/sprout/labels{/name}","releases_url":"https://api.github.com/repos/Metaswitch/sprout/releases{/id}","deployments_url":"https://api.github.com/repos/Metaswitch/sprout/deployments","created_at":"2013-05-06T13:37:07Z","updated_at":"2016-10-03T06:00:28Z","pushed_at":"2016-10-07T12:57:33Z","git_url":"git://github.com/Metaswitch/sprout.git","ssh_url":"git@github.com:Metaswitch/sprout.git","clone_url":"https://github.com/Metaswitch/sprout.git","svn_url":"https://github.com/Metaswitch/sprout","homepage":null,"size":35491,"stargazers_count":17,"watchers_count":17,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":24,"mirror_url":null,"open_issues_count":95,"forks":24,"open_issues":95,"watchers":17,"default_branch":"dev"}},"base":{"label":"Metaswitch:dev","ref":"dev","sha":"229af78ffee076bd985d56bf079cecc631d732e2","user":{"login":"Metaswitch","id":453759,"avatar_url":"https://avatars.githubusercontent.com/u/453759?v=3","gravatar_id":"","url":"https://api.github.com/users/Metaswitch","html_url":"https://github.com/Metaswitch","followers_url":"https://api.github.com/users/Metaswitch/followers","following_url":"https://api.github.com/users/Metaswitch/following{/other_user}","gists_url":"https://api.github.com/users/Metaswitch/gists{/gist_id}","starred_url":"https://api.github.com/users/Metaswitch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Metaswitch/subscriptions","organizations_url":"https://api.github.com/users/Metaswitch/orgs","repos_url":"https://api.github.com/users/Metaswitch/repos","events_url":"https://api.github.com/users/Metaswitch/events{/privacy}","received_events_url":"https://api.github.com/users/Metaswitch/received_events","type":"Organization","site_admin":false},"repo":{"id":9887542,"name":"sprout","full_name":"Metaswitch/sprout","owner":{"login":"Metaswitch","id":453759,"avatar_url":"https://avatars.githubusercontent.com/u/453759?v=3","gravatar_id":"","url":"https://api.github.com/users/Metaswitch","html_url":"https://github.com/Metaswitch","followers_url":"https://api.github.com/users/Metaswitch/followers","following_url":"https://api.github.com/users/Metaswitch/following{/other_user}","gists_url":"https://api.github.com/users/Metaswitch/gists{/gist_id}","starred_url":"https://api.github.com/users/Metaswitch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Metaswitch/subscriptions","organizations_url":"https://api.github.com/users/Metaswitch/orgs","repos_url":"https://api.github.com/users/Metaswitch/repos","events_url":"https://api.github.com/users/Metaswitch/events{/privacy}","received_events_url":"https://api.github.com/users/Metaswitch/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Metaswitch/sprout","description":"sprout and bono, the Clearwater SIP router and edge proxy","fork":false,"url":"https://api.github.com/repos/Metaswitch/sprout","forks_url":"https://api.github.com/repos/Metaswitch/sprout/forks","keys_url":"https://api.github.com/repos/Metaswitch/sprout/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Metaswitch/sprout/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Metaswitch/sprout/teams","hooks_url":"https://api.github.com/repos/Metaswitch/sprout/hooks","issue_events_url":"https://api.github.com/repos/Metaswitch/sprout/issues/events{/number}","events_url":"https://api.github.com/repos/Metaswitch/sprout/events","assignees_url":"https://api.github.com/repos/Metaswitch/sprout/assignees{/user}","branches_url":"https://api.github.com/repos/Metaswitch/sprout/branches{/branch}","tags_url":"https://api.github.com/repos/Metaswitch/sprout/tags","blobs_url":"https://api.github.com/repos/Metaswitch/sprout/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Metaswitch/sprout/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Metaswitch/sprout/git/refs{/sha}","trees_url":"https://api.github.com/repos/Metaswitch/sprout/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Metaswitch/sprout/statuses/{sha}","languages_url":"https://api.github.com/repos/Metaswitch/sprout/languages","stargazers_url":"https://api.github.com/repos/Metaswitch/sprout/stargazers","contributors_url":"https://api.github.com/repos/Metaswitch/sprout/contributors","subscribers_url":"https://api.github.com/repos/Metaswitch/sprout/subscribers","subscription_url":"https://api.github.com/repos/Metaswitch/sprout/subscription","commits_url":"https://api.github.com/repos/Metaswitch/sprout/commits{/sha}","git_commits_url":"https://api.github.com/repos/Metaswitch/sprout/git/commits{/sha}","comments_url":"https://api.github.com/repos/Metaswitch/sprout/comments{/number}","issue_comment_url":"https://api.github.com/repos/Metaswitch/sprout/issues/comments{/number}","contents_url":"https://api.github.com/repos/Metaswitch/sprout/contents/{+path}","compare_url":"https://api.github.com/repos/Metaswitch/sprout/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Metaswitch/sprout/merges","archive_url":"https://api.github.com/repos/Metaswitch/sprout/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Metaswitch/sprout/downloads","issues_url":"https://api.github.com/repos/Metaswitch/sprout/issues{/number}","pulls_url":"https://api.github.com/repos/Metaswitch/sprout/pulls{/number}","milestones_url":"https://api.github.com/repos/Metaswitch/sprout/milestones{/number}","notifications_url":"https://api.github.com/repos/Metaswitch/sprout/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Metaswitch/sprout/labels{/name}","releases_url":"https://api.github.com/repos/Metaswitch/sprout/releases{/id}","deployments_url":"https://api.github.com/repos/Metaswitch/sprout/deployments","created_at":"2013-05-06T13:37:07Z","updated_at":"2016-10-03T06:00:28Z","pushed_at":"2016-10-07T12:57:33Z","git_url":"git://github.com/Metaswitch/sprout.git","ssh_url":"git@github.com:Metaswitch/sprout.git","clone_url":"https://github.com/Metaswitch/sprout.git","svn_url":"https://github.com/Metaswitch/sprout","homepage":null,"size":35491,"stargazers_count":17,"watchers_count":17,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":24,"mirror_url":null,"open_issues_count":95,"forks":24,"open_issues":95,"watchers":17,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/Metaswitch/sprout/pulls/1551"},"html":{"href":"https://github.com/Metaswitch/sprout/pull/1551"},"issue":{"href":"https://api.github.com/repos/Metaswitch/sprout/issues/1551"},"comments":{"href":"https://api.github.com/repos/Metaswitch/sprout/issues/1551/comments"},"review_comments":{"href":"https://api.github.com/repos/Metaswitch/sprout/pulls/1551/comments"},"review_comment":{"href":"https://api.github.com/repos/Metaswitch/sprout/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Metaswitch/sprout/pulls/1551/commits"},"statuses":{"href":"https://api.github.com/repos/Metaswitch/sprout/statuses/1fe94f488957ee5596b251afa6d7ed65c28c143b"}}}}
{"actor":{"display_login":"AlexHockey"}}