{"action":"created","comment":{"url":"https://api.github.com/repos/openchange/openchange/pulls/comments/37734837","id":37734837,"diff_hunk":"@@ -40,63 +44,54 @@\n    \\return Pointer to an allocated mpm_session structure on success,\n    otherwise NULL\n  */\n-struct mpm_session *mpm_session_new(TALLOC_CTX *mem_ctx, \n-\t\t\t\t     struct server_id serverid,\n-\t\t\t\t     uint32_t context_id)\n+struct mpm_session *mpm_session_new(struct server_id serverid,","path":"mapiproxy/libmapiproxy/dcesrv_mapiproxy_session.c","position":32,"original_position":32,"commit_id":"65ab2be0632284a6f70b931fdf3badb93f9fae2c","original_commit_id":"65ab2be0632284a6f70b931fdf3badb93f9fae2c","user":{"login":"blaxter","id":8926,"avatar_url":"https://avatars.githubusercontent.com/u/8926?v=3","gravatar_id":"","url":"https://api.github.com/users/blaxter","html_url":"https://github.com/blaxter","followers_url":"https://api.github.com/users/blaxter/followers","following_url":"https://api.github.com/users/blaxter/following{/other_user}","gists_url":"https://api.github.com/users/blaxter/gists{/gist_id}","starred_url":"https://api.github.com/users/blaxter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blaxter/subscriptions","organizations_url":"https://api.github.com/users/blaxter/orgs","repos_url":"https://api.github.com/users/blaxter/repos","events_url":"https://api.github.com/users/blaxter/events{/privacy}","received_events_url":"https://api.github.com/users/blaxter/received_events","type":"User","site_admin":false},"body":"This method should be private, it's only used at `mpm_session_init`","created_at":"2015-08-24T09:42:33Z","updated_at":"2015-08-24T09:42:33Z","html_url":"https://github.com/openchange/openchange/pull/389#discussion_r37734837","pull_request_url":"https://api.github.com/repos/openchange/openchange/pulls/389","_links":{"self":{"href":"https://api.github.com/repos/openchange/openchange/pulls/comments/37734837"},"html":{"href":"https://github.com/openchange/openchange/pull/389#discussion_r37734837"},"pull_request":{"href":"https://api.github.com/repos/openchange/openchange/pulls/389"}}},"pull_request":{"url":"https://api.github.com/repos/openchange/openchange/pulls/389","id":43054253,"html_url":"https://github.com/openchange/openchange/pull/389","diff_url":"https://github.com/openchange/openchange/pull/389.diff","patch_url":"https://github.com/openchange/openchange/pull/389.patch","issue_url":"https://api.github.com/repos/openchange/openchange/issues/389","number":389,"state":"open","locked":false,"title":"Free user sessions on unbind","user":{"login":"exekias","id":299804,"avatar_url":"https://avatars.githubusercontent.com/u/299804?v=3","gravatar_id":"","url":"https://api.github.com/users/exekias","html_url":"https://github.com/exekias","followers_url":"https://api.github.com/users/exekias/followers","following_url":"https://api.github.com/users/exekias/following{/other_user}","gists_url":"https://api.github.com/users/exekias/gists{/gist_id}","starred_url":"https://api.github.com/users/exekias/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/exekias/subscriptions","organizations_url":"https://api.github.com/users/exekias/orgs","repos_url":"https://api.github.com/users/exekias/repos","events_url":"https://api.github.com/users/exekias/events{/privacy}","received_events_url":"https://api.github.com/users/exekias/received_events","type":"User","site_admin":false},"body":"This PR unifies session handling (under mpm_session) for nspi, emsmdb and asyncemsmdb.\r\n\r\nAfter researching on RPC sessions, along with @blaxter, we decided to implement session releasing this way:\r\n\r\n * When a session is created, it's assigned to the server_id, context_id it was created on\r\n * On unbind, server_id, context_id pair is marked as released\r\n * When all user contexts are marked as released, underlying sessions are released too\r\n\r\nThis will ensure that we don't free a session that would be reused on a server_id, context_id different from the one it was created on (and that happens on common clients). Delaying session freeing to the last channel close.\r\n","created_at":"2015-08-21T16:10:01Z","updated_at":"2015-08-24T09:42:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3f6165cf26cf6fe2eb32fbcc8c75e97ccc49d139","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/openchange/openchange/pulls/389/commits","review_comments_url":"https://api.github.com/repos/openchange/openchange/pulls/389/comments","review_comment_url":"https://api.github.com/repos/openchange/openchange/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openchange/openchange/issues/389/comments","statuses_url":"https://api.github.com/repos/openchange/openchange/statuses/65ab2be0632284a6f70b931fdf3badb93f9fae2c","head":{"label":"exekias:safe-free-sessions","ref":"safe-free-sessions","sha":"65ab2be0632284a6f70b931fdf3badb93f9fae2c","user":{"login":"exekias","id":299804,"avatar_url":"https://avatars.githubusercontent.com/u/299804?v=3","gravatar_id":"","url":"https://api.github.com/users/exekias","html_url":"https://github.com/exekias","followers_url":"https://api.github.com/users/exekias/followers","following_url":"https://api.github.com/users/exekias/following{/other_user}","gists_url":"https://api.github.com/users/exekias/gists{/gist_id}","starred_url":"https://api.github.com/users/exekias/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/exekias/subscriptions","organizations_url":"https://api.github.com/users/exekias/orgs","repos_url":"https://api.github.com/users/exekias/repos","events_url":"https://api.github.com/users/exekias/events{/privacy}","received_events_url":"https://api.github.com/users/exekias/received_events","type":"User","site_admin":false},"repo":{"id":13910336,"name":"openchange","full_name":"exekias/openchange","owner":{"login":"exekias","id":299804,"avatar_url":"https://avatars.githubusercontent.com/u/299804?v=3","gravatar_id":"","url":"https://api.github.com/users/exekias","html_url":"https://github.com/exekias","followers_url":"https://api.github.com/users/exekias/followers","following_url":"https://api.github.com/users/exekias/following{/other_user}","gists_url":"https://api.github.com/users/exekias/gists{/gist_id}","starred_url":"https://api.github.com/users/exekias/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/exekias/subscriptions","organizations_url":"https://api.github.com/users/exekias/orgs","repos_url":"https://api.github.com/users/exekias/repos","events_url":"https://api.github.com/users/exekias/events{/privacy}","received_events_url":"https://api.github.com/users/exekias/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/exekias/openchange","description":"OpenChange Project","fork":true,"url":"https://api.github.com/repos/exekias/openchange","forks_url":"https://api.github.com/repos/exekias/openchange/forks","keys_url":"https://api.github.com/repos/exekias/openchange/keys{/key_id}","collaborators_url":"https://api.github.com/repos/exekias/openchange/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/exekias/openchange/teams","hooks_url":"https://api.github.com/repos/exekias/openchange/hooks","issue_events_url":"https://api.github.com/repos/exekias/openchange/issues/events{/number}","events_url":"https://api.github.com/repos/exekias/openchange/events","assignees_url":"https://api.github.com/repos/exekias/openchange/assignees{/user}","branches_url":"https://api.github.com/repos/exekias/openchange/branches{/branch}","tags_url":"https://api.github.com/repos/exekias/openchange/tags","blobs_url":"https://api.github.com/repos/exekias/openchange/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/exekias/openchange/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/exekias/openchange/git/refs{/sha}","trees_url":"https://api.github.com/repos/exekias/openchange/git/trees{/sha}","statuses_url":"https://api.github.com/repos/exekias/openchange/statuses/{sha}","languages_url":"https://api.github.com/repos/exekias/openchange/languages","stargazers_url":"https://api.github.com/repos/exekias/openchange/stargazers","contributors_url":"https://api.github.com/repos/exekias/openchange/contributors","subscribers_url":"https://api.github.com/repos/exekias/openchange/subscribers","subscription_url":"https://api.github.com/repos/exekias/openchange/subscription","commits_url":"https://api.github.com/repos/exekias/openchange/commits{/sha}","git_commits_url":"https://api.github.com/repos/exekias/openchange/git/commits{/sha}","comments_url":"https://api.github.com/repos/exekias/openchange/comments{/number}","issue_comment_url":"https://api.github.com/repos/exekias/openchange/issues/comments{/number}","contents_url":"https://api.github.com/repos/exekias/openchange/contents/{+path}","compare_url":"https://api.github.com/repos/exekias/openchange/compare/{base}...{head}","merges_url":"https://api.github.com/repos/exekias/openchange/merges","archive_url":"https://api.github.com/repos/exekias/openchange/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/exekias/openchange/downloads","issues_url":"https://api.github.com/repos/exekias/openchange/issues{/number}","pulls_url":"https://api.github.com/repos/exekias/openchange/pulls{/number}","milestones_url":"https://api.github.com/repos/exekias/openchange/milestones{/number}","notifications_url":"https://api.github.com/repos/exekias/openchange/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/exekias/openchange/labels{/name}","releases_url":"https://api.github.com/repos/exekias/openchange/releases{/id}","created_at":"2013-10-27T21:05:50Z","updated_at":"2014-10-06T13:24:11Z","pushed_at":"2015-08-21T16:14:37Z","git_url":"git://github.com/exekias/openchange.git","ssh_url":"git@github.com:exekias/openchange.git","clone_url":"https://github.com/exekias/openchange.git","svn_url":"https://github.com/exekias/openchange","homepage":null,"size":20876,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"openchange:master","ref":"master","sha":"6ecc2cf36938e9add7c46b2594301c4f16af665b","user":{"login":"openchange","id":5413705,"avatar_url":"https://avatars.githubusercontent.com/u/5413705?v=3","gravatar_id":"","url":"https://api.github.com/users/openchange","html_url":"https://github.com/openchange","followers_url":"https://api.github.com/users/openchange/followers","following_url":"https://api.github.com/users/openchange/following{/other_user}","gists_url":"https://api.github.com/users/openchange/gists{/gist_id}","starred_url":"https://api.github.com/users/openchange/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openchange/subscriptions","organizations_url":"https://api.github.com/users/openchange/orgs","repos_url":"https://api.github.com/users/openchange/repos","events_url":"https://api.github.com/users/openchange/events{/privacy}","received_events_url":"https://api.github.com/users/openchange/received_events","type":"Organization","site_admin":false},"repo":{"id":12688822,"name":"openchange","full_name":"openchange/openchange","owner":{"login":"openchange","id":5413705,"avatar_url":"https://avatars.githubusercontent.com/u/5413705?v=3","gravatar_id":"","url":"https://api.github.com/users/openchange","html_url":"https://github.com/openchange","followers_url":"https://api.github.com/users/openchange/followers","following_url":"https://api.github.com/users/openchange/following{/other_user}","gists_url":"https://api.github.com/users/openchange/gists{/gist_id}","starred_url":"https://api.github.com/users/openchange/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openchange/subscriptions","organizations_url":"https://api.github.com/users/openchange/orgs","repos_url":"https://api.github.com/users/openchange/repos","events_url":"https://api.github.com/users/openchange/events{/privacy}","received_events_url":"https://api.github.com/users/openchange/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openchange/openchange","description":"OpenChange Project","fork":false,"url":"https://api.github.com/repos/openchange/openchange","forks_url":"https://api.github.com/repos/openchange/openchange/forks","keys_url":"https://api.github.com/repos/openchange/openchange/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openchange/openchange/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openchange/openchange/teams","hooks_url":"https://api.github.com/repos/openchange/openchange/hooks","issue_events_url":"https://api.github.com/repos/openchange/openchange/issues/events{/number}","events_url":"https://api.github.com/repos/openchange/openchange/events","assignees_url":"https://api.github.com/repos/openchange/openchange/assignees{/user}","branches_url":"https://api.github.com/repos/openchange/openchange/branches{/branch}","tags_url":"https://api.github.com/repos/openchange/openchange/tags","blobs_url":"https://api.github.com/repos/openchange/openchange/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openchange/openchange/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openchange/openchange/git/refs{/sha}","trees_url":"https://api.github.com/repos/openchange/openchange/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openchange/openchange/statuses/{sha}","languages_url":"https://api.github.com/repos/openchange/openchange/languages","stargazers_url":"https://api.github.com/repos/openchange/openchange/stargazers","contributors_url":"https://api.github.com/repos/openchange/openchange/contributors","subscribers_url":"https://api.github.com/repos/openchange/openchange/subscribers","subscription_url":"https://api.github.com/repos/openchange/openchange/subscription","commits_url":"https://api.github.com/repos/openchange/openchange/commits{/sha}","git_commits_url":"https://api.github.com/repos/openchange/openchange/git/commits{/sha}","comments_url":"https://api.github.com/repos/openchange/openchange/comments{/number}","issue_comment_url":"https://api.github.com/repos/openchange/openchange/issues/comments{/number}","contents_url":"https://api.github.com/repos/openchange/openchange/contents/{+path}","compare_url":"https://api.github.com/repos/openchange/openchange/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openchange/openchange/merges","archive_url":"https://api.github.com/repos/openchange/openchange/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openchange/openchange/downloads","issues_url":"https://api.github.com/repos/openchange/openchange/issues{/number}","pulls_url":"https://api.github.com/repos/openchange/openchange/pulls{/number}","milestones_url":"https://api.github.com/repos/openchange/openchange/milestones{/number}","notifications_url":"https://api.github.com/repos/openchange/openchange/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openchange/openchange/labels{/name}","releases_url":"https://api.github.com/repos/openchange/openchange/releases{/id}","created_at":"2013-09-08T22:39:00Z","updated_at":"2015-08-23T21:40:51Z","pushed_at":"2015-08-24T09:36:13Z","git_url":"git://github.com/openchange/openchange.git","ssh_url":"git@github.com:openchange/openchange.git","clone_url":"https://github.com/openchange/openchange.git","svn_url":"https://github.com/openchange/openchange","homepage":null,"size":26934,"stargazers_count":59,"watchers_count":59,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":27,"mirror_url":null,"open_issues_count":28,"forks":27,"open_issues":28,"watchers":59,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openchange/openchange/pulls/389"},"html":{"href":"https://github.com/openchange/openchange/pull/389"},"issue":{"href":"https://api.github.com/repos/openchange/openchange/issues/389"},"comments":{"href":"https://api.github.com/repos/openchange/openchange/issues/389/comments"},"review_comments":{"href":"https://api.github.com/repos/openchange/openchange/pulls/389/comments"},"review_comment":{"href":"https://api.github.com/repos/openchange/openchange/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openchange/openchange/pulls/389/commits"},"statuses":{"href":"https://api.github.com/repos/openchange/openchange/statuses/65ab2be0632284a6f70b931fdf3badb93f9fae2c"}}}}