{"action":"created","comment":{"url":"https://api.github.com/repos/endlessm/mogwai/pulls/comments/188668245","pull_request_review_id":120693474,"id":188668245,"diff_hunk":"@@ -69,23 +95,52 @@ mws_connection_monitor_dummy_connection_monitor_init (MwsConnectionMonitorInterf\n static void\n mws_connection_monitor_dummy_init (MwsConnectionMonitorDummy *self)\n {\n-  /* Nothing here. */\n+  self->connections = g_hash_table_new_full (g_str_hash, g_str_equal, g_free,\n+                                             (GDestroyNotify) connection_details_free);\n+  self->cached_connection_ids = NULL;\n }\n \n-static const gchar * const connection_ids[] = { NULL, };\n+static void\n+mws_connection_monitor_dummy_finalize (GObject *object)\n+{\n+  MwsConnectionMonitorDummy *self = MWS_CONNECTION_MONITOR_DUMMY (object);\n+\n+  g_clear_pointer (&self->connections, g_hash_table_unref);\n+  g_clear_pointer (&self->cached_connection_ids, g_free);\n+\n+  G_OBJECT_CLASS (mws_connection_monitor_dummy_parent_class)->finalize (object);\n+}\n \n static const gchar * const *\n mws_connection_monitor_dummy_get_connection_ids (MwsConnectionMonitor *monitor)\n {\n-  return connection_ids;\n+  MwsConnectionMonitorDummy *self = MWS_CONNECTION_MONITOR_DUMMY (monitor);\n+\n+  if (self->cached_connection_ids == NULL)\n+    self->cached_connection_ids =\n+        (const gchar **) g_hash_table_get_keys_as_array (self->connections, NULL);\n+\n+  return self->cached_connection_ids;\n }\n \n static gboolean\n mws_connection_monitor_dummy_get_connection_details (MwsConnectionMonitor *monitor,\n                                                      const gchar          *id,\n                                                      MwsConnectionDetails *out_details)\n {\n-  return FALSE;\n+  MwsConnectionMonitorDummy *self = MWS_CONNECTION_MONITOR_DUMMY (monitor);\n+\n+  const MwsConnectionDetails *found_details = g_hash_table_lookup (self->connections, id);\n+\n+  if (found_details != NULL)\n+    {\n+      connection_details_copy (found_details, out_details);\n+      return TRUE;\n+    }\n+  else\n+    {","path":"libmogwai-schedule/tests/connection-monitor-dummy.c","position":112,"original_position":112,"commit_id":"c96ba28fd3acecedf88e77ff5cdf0ac2664ec6c5","original_commit_id":"0bd573cd0ed15576019d0a3811f83be34938d5f2","user":{"login":"pwithnall","id":53172,"avatar_url":"https://avatars2.githubusercontent.com/u/53172?v=4","gravatar_id":"","url":"https://api.github.com/users/pwithnall","html_url":"https://github.com/pwithnall","followers_url":"https://api.github.com/users/pwithnall/followers","following_url":"https://api.github.com/users/pwithnall/following{/other_user}","gists_url":"https://api.github.com/users/pwithnall/gists{/gist_id}","starred_url":"https://api.github.com/users/pwithnall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pwithnall/subscriptions","organizations_url":"https://api.github.com/users/pwithnall/orgs","repos_url":"https://api.github.com/users/pwithnall/repos","events_url":"https://api.github.com/users/pwithnall/events{/privacy}","received_events_url":"https://api.github.com/users/pwithnall/received_events","type":"User","site_admin":false},"body":"Personal preference: keeps all the `return` statements at an equal depth.","created_at":"2018-05-16T15:25:27Z","updated_at":"2018-05-16T15:25:27Z","html_url":"https://github.com/endlessm/mogwai/pull/50#discussion_r188668245","pull_request_url":"https://api.github.com/repos/endlessm/mogwai/pulls/50","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/endlessm/mogwai/pulls/comments/188668245"},"html":{"href":"https://github.com/endlessm/mogwai/pull/50#discussion_r188668245"},"pull_request":{"href":"https://api.github.com/repos/endlessm/mogwai/pulls/50"}},"in_reply_to_id":188570874},"pull_request":{"url":"https://api.github.com/repos/endlessm/mogwai/pulls/50","id":188124861,"html_url":"https://github.com/endlessm/mogwai/pull/50","diff_url":"https://github.com/endlessm/mogwai/pull/50.diff","patch_url":"https://github.com/endlessm/mogwai/pull/50.patch","issue_url":"https://api.github.com/repos/endlessm/mogwai/issues/50","number":50,"state":"open","locked":false,"title":"T20423 Scheduler tests","user":{"login":"pwithnall","id":53172,"avatar_url":"https://avatars2.githubusercontent.com/u/53172?v=4","gravatar_id":"","url":"https://api.github.com/users/pwithnall","html_url":"https://github.com/pwithnall","followers_url":"https://api.github.com/users/pwithnall/followers","following_url":"https://api.github.com/users/pwithnall/following{/other_user}","gists_url":"https://api.github.com/users/pwithnall/gists{/gist_id}","starred_url":"https://api.github.com/users/pwithnall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pwithnall/subscriptions","organizations_url":"https://api.github.com/users/pwithnall/orgs","repos_url":"https://api.github.com/users/pwithnall/repos","events_url":"https://api.github.com/users/pwithnall/events{/privacy}","received_events_url":"https://api.github.com/users/pwithnall/received_events","type":"User","site_admin":false},"body":"https://phabricator.endlessm.com/T20423","created_at":"2018-05-15T13:16:45Z","updated_at":"2018-05-16T15:25:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f51b0e7f87d3100ab9624627d7a758d7c0814694","assignee":{"login":"pwithnall","id":53172,"avatar_url":"https://avatars2.githubusercontent.com/u/53172?v=4","gravatar_id":"","url":"https://api.github.com/users/pwithnall","html_url":"https://github.com/pwithnall","followers_url":"https://api.github.com/users/pwithnall/followers","following_url":"https://api.github.com/users/pwithnall/following{/other_user}","gists_url":"https://api.github.com/users/pwithnall/gists{/gist_id}","starred_url":"https://api.github.com/users/pwithnall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pwithnall/subscriptions","organizations_url":"https://api.github.com/users/pwithnall/orgs","repos_url":"https://api.github.com/users/pwithnall/repos","events_url":"https://api.github.com/users/pwithnall/events{/privacy}","received_events_url":"https://api.github.com/users/pwithnall/received_events","type":"User","site_admin":false},"assignees":[{"login":"pwithnall","id":53172,"avatar_url":"https://avatars2.githubusercontent.com/u/53172?v=4","gravatar_id":"","url":"https://api.github.com/users/pwithnall","html_url":"https://github.com/pwithnall","followers_url":"https://api.github.com/users/pwithnall/followers","following_url":"https://api.github.com/users/pwithnall/following{/other_user}","gists_url":"https://api.github.com/users/pwithnall/gists{/gist_id}","starred_url":"https://api.github.com/users/pwithnall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pwithnall/subscriptions","organizations_url":"https://api.github.com/users/pwithnall/orgs","repos_url":"https://api.github.com/users/pwithnall/repos","events_url":"https://api.github.com/users/pwithnall/events{/privacy}","received_events_url":"https://api.github.com/users/pwithnall/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"mariospr","id":2197259,"avatar_url":"https://avatars1.githubusercontent.com/u/2197259?v=4","gravatar_id":"","url":"https://api.github.com/users/mariospr","html_url":"https://github.com/mariospr","followers_url":"https://api.github.com/users/mariospr/followers","following_url":"https://api.github.com/users/mariospr/following{/other_user}","gists_url":"https://api.github.com/users/mariospr/gists{/gist_id}","starred_url":"https://api.github.com/users/mariospr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mariospr/subscriptions","organizations_url":"https://api.github.com/users/mariospr/orgs","repos_url":"https://api.github.com/users/mariospr/repos","events_url":"https://api.github.com/users/mariospr/events{/privacy}","received_events_url":"https://api.github.com/users/mariospr/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/endlessm/mogwai/pulls/50/commits","review_comments_url":"https://api.github.com/repos/endlessm/mogwai/pulls/50/comments","review_comment_url":"https://api.github.com/repos/endlessm/mogwai/pulls/comments{/number}","comments_url":"https://api.github.com/repos/endlessm/mogwai/issues/50/comments","statuses_url":"https://api.github.com/repos/endlessm/mogwai/statuses/c96ba28fd3acecedf88e77ff5cdf0ac2664ec6c5","head":{"label":"endlessm:T20423-scheduler-tests","ref":"T20423-scheduler-tests","sha":"c96ba28fd3acecedf88e77ff5cdf0ac2664ec6c5","user":{"login":"endlessm","id":1930958,"avatar_url":"https://avatars1.githubusercontent.com/u/1930958?v=4","gravatar_id":"","url":"https://api.github.com/users/endlessm","html_url":"https://github.com/endlessm","followers_url":"https://api.github.com/users/endlessm/followers","following_url":"https://api.github.com/users/endlessm/following{/other_user}","gists_url":"https://api.github.com/users/endlessm/gists{/gist_id}","starred_url":"https://api.github.com/users/endlessm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/endlessm/subscriptions","organizations_url":"https://api.github.com/users/endlessm/orgs","repos_url":"https://api.github.com/users/endlessm/repos","events_url":"https://api.github.com/users/endlessm/events{/privacy}","received_events_url":"https://api.github.com/users/endlessm/received_events","type":"Organization","site_admin":false},"repo":{"id":113890043,"name":"mogwai","full_name":"endlessm/mogwai","owner":{"login":"endlessm","id":1930958,"avatar_url":"https://avatars1.githubusercontent.com/u/1930958?v=4","gravatar_id":"","url":"https://api.github.com/users/endlessm","html_url":"https://github.com/endlessm","followers_url":"https://api.github.com/users/endlessm/followers","following_url":"https://api.github.com/users/endlessm/following{/other_user}","gists_url":"https://api.github.com/users/endlessm/gists{/gist_id}","starred_url":"https://api.github.com/users/endlessm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/endlessm/subscriptions","organizations_url":"https://api.github.com/users/endlessm/orgs","repos_url":"https://api.github.com/users/endlessm/repos","events_url":"https://api.github.com/users/endlessm/events{/privacy}","received_events_url":"https://api.github.com/users/endlessm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/endlessm/mogwai","description":null,"fork":false,"url":"https://api.github.com/repos/endlessm/mogwai","forks_url":"https://api.github.com/repos/endlessm/mogwai/forks","keys_url":"https://api.github.com/repos/endlessm/mogwai/keys{/key_id}","collaborators_url":"https://api.github.com/repos/endlessm/mogwai/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/endlessm/mogwai/teams","hooks_url":"https://api.github.com/repos/endlessm/mogwai/hooks","issue_events_url":"https://api.github.com/repos/endlessm/mogwai/issues/events{/number}","events_url":"https://api.github.com/repos/endlessm/mogwai/events","assignees_url":"https://api.github.com/repos/endlessm/mogwai/assignees{/user}","branches_url":"https://api.github.com/repos/endlessm/mogwai/branches{/branch}","tags_url":"https://api.github.com/repos/endlessm/mogwai/tags","blobs_url":"https://api.github.com/repos/endlessm/mogwai/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/endlessm/mogwai/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/endlessm/mogwai/git/refs{/sha}","trees_url":"https://api.github.com/repos/endlessm/mogwai/git/trees{/sha}","statuses_url":"https://api.github.com/repos/endlessm/mogwai/statuses/{sha}","languages_url":"https://api.github.com/repos/endlessm/mogwai/languages","stargazers_url":"https://api.github.com/repos/endlessm/mogwai/stargazers","contributors_url":"https://api.github.com/repos/endlessm/mogwai/contributors","subscribers_url":"https://api.github.com/repos/endlessm/mogwai/subscribers","subscription_url":"https://api.github.com/repos/endlessm/mogwai/subscription","commits_url":"https://api.github.com/repos/endlessm/mogwai/commits{/sha}","git_commits_url":"https://api.github.com/repos/endlessm/mogwai/git/commits{/sha}","comments_url":"https://api.github.com/repos/endlessm/mogwai/comments{/number}","issue_comment_url":"https://api.github.com/repos/endlessm/mogwai/issues/comments{/number}","contents_url":"https://api.github.com/repos/endlessm/mogwai/contents/{+path}","compare_url":"https://api.github.com/repos/endlessm/mogwai/compare/{base}...{head}","merges_url":"https://api.github.com/repos/endlessm/mogwai/merges","archive_url":"https://api.github.com/repos/endlessm/mogwai/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/endlessm/mogwai/downloads","issues_url":"https://api.github.com/repos/endlessm/mogwai/issues{/number}","pulls_url":"https://api.github.com/repos/endlessm/mogwai/pulls{/number}","milestones_url":"https://api.github.com/repos/endlessm/mogwai/milestones{/number}","notifications_url":"https://api.github.com/repos/endlessm/mogwai/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/endlessm/mogwai/labels{/name}","releases_url":"https://api.github.com/repos/endlessm/mogwai/releases{/id}","deployments_url":"https://api.github.com/repos/endlessm/mogwai/deployments","created_at":"2017-12-11T17:47:42Z","updated_at":"2018-05-09T15:57:10Z","pushed_at":"2018-05-15T20:37:24Z","git_url":"git://github.com/endlessm/mogwai.git","ssh_url":"git@github.com:endlessm/mogwai.git","clone_url":"https://github.com/endlessm/mogwai.git","svn_url":"https://github.com/endlessm/mogwai","homepage":null,"size":558,"stargazers_count":1,"watchers_count":1,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"lgpl-2.1","name":"GNU Lesser General Public License v2.1","spdx_id":"LGPL-2.1","url":"https://api.github.com/licenses/lgpl-2.1"},"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"endlessm:master","ref":"master","sha":"7ec1b217ccca212d205fe56127034c4de9e97aa3","user":{"login":"endlessm","id":1930958,"avatar_url":"https://avatars1.githubusercontent.com/u/1930958?v=4","gravatar_id":"","url":"https://api.github.com/users/endlessm","html_url":"https://github.com/endlessm","followers_url":"https://api.github.com/users/endlessm/followers","following_url":"https://api.github.com/users/endlessm/following{/other_user}","gists_url":"https://api.github.com/users/endlessm/gists{/gist_id}","starred_url":"https://api.github.com/users/endlessm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/endlessm/subscriptions","organizations_url":"https://api.github.com/users/endlessm/orgs","repos_url":"https://api.github.com/users/endlessm/repos","events_url":"https://api.github.com/users/endlessm/events{/privacy}","received_events_url":"https://api.github.com/users/endlessm/received_events","type":"Organization","site_admin":false},"repo":{"id":113890043,"name":"mogwai","full_name":"endlessm/mogwai","owner":{"login":"endlessm","id":1930958,"avatar_url":"https://avatars1.githubusercontent.com/u/1930958?v=4","gravatar_id":"","url":"https://api.github.com/users/endlessm","html_url":"https://github.com/endlessm","followers_url":"https://api.github.com/users/endlessm/followers","following_url":"https://api.github.com/users/endlessm/following{/other_user}","gists_url":"https://api.github.com/users/endlessm/gists{/gist_id}","starred_url":"https://api.github.com/users/endlessm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/endlessm/subscriptions","organizations_url":"https://api.github.com/users/endlessm/orgs","repos_url":"https://api.github.com/users/endlessm/repos","events_url":"https://api.github.com/users/endlessm/events{/privacy}","received_events_url":"https://api.github.com/users/endlessm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/endlessm/mogwai","description":null,"fork":false,"url":"https://api.github.com/repos/endlessm/mogwai","forks_url":"https://api.github.com/repos/endlessm/mogwai/forks","keys_url":"https://api.github.com/repos/endlessm/mogwai/keys{/key_id}","collaborators_url":"https://api.github.com/repos/endlessm/mogwai/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/endlessm/mogwai/teams","hooks_url":"https://api.github.com/repos/endlessm/mogwai/hooks","issue_events_url":"https://api.github.com/repos/endlessm/mogwai/issues/events{/number}","events_url":"https://api.github.com/repos/endlessm/mogwai/events","assignees_url":"https://api.github.com/repos/endlessm/mogwai/assignees{/user}","branches_url":"https://api.github.com/repos/endlessm/mogwai/branches{/branch}","tags_url":"https://api.github.com/repos/endlessm/mogwai/tags","blobs_url":"https://api.github.com/repos/endlessm/mogwai/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/endlessm/mogwai/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/endlessm/mogwai/git/refs{/sha}","trees_url":"https://api.github.com/repos/endlessm/mogwai/git/trees{/sha}","statuses_url":"https://api.github.com/repos/endlessm/mogwai/statuses/{sha}","languages_url":"https://api.github.com/repos/endlessm/mogwai/languages","stargazers_url":"https://api.github.com/repos/endlessm/mogwai/stargazers","contributors_url":"https://api.github.com/repos/endlessm/mogwai/contributors","subscribers_url":"https://api.github.com/repos/endlessm/mogwai/subscribers","subscription_url":"https://api.github.com/repos/endlessm/mogwai/subscription","commits_url":"https://api.github.com/repos/endlessm/mogwai/commits{/sha}","git_commits_url":"https://api.github.com/repos/endlessm/mogwai/git/commits{/sha}","comments_url":"https://api.github.com/repos/endlessm/mogwai/comments{/number}","issue_comment_url":"https://api.github.com/repos/endlessm/mogwai/issues/comments{/number}","contents_url":"https://api.github.com/repos/endlessm/mogwai/contents/{+path}","compare_url":"https://api.github.com/repos/endlessm/mogwai/compare/{base}...{head}","merges_url":"https://api.github.com/repos/endlessm/mogwai/merges","archive_url":"https://api.github.com/repos/endlessm/mogwai/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/endlessm/mogwai/downloads","issues_url":"https://api.github.com/repos/endlessm/mogwai/issues{/number}","pulls_url":"https://api.github.com/repos/endlessm/mogwai/pulls{/number}","milestones_url":"https://api.github.com/repos/endlessm/mogwai/milestones{/number}","notifications_url":"https://api.github.com/repos/endlessm/mogwai/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/endlessm/mogwai/labels{/name}","releases_url":"https://api.github.com/repos/endlessm/mogwai/releases{/id}","deployments_url":"https://api.github.com/repos/endlessm/mogwai/deployments","created_at":"2017-12-11T17:47:42Z","updated_at":"2018-05-09T15:57:10Z","pushed_at":"2018-05-15T20:37:24Z","git_url":"git://github.com/endlessm/mogwai.git","ssh_url":"git@github.com:endlessm/mogwai.git","clone_url":"https://github.com/endlessm/mogwai.git","svn_url":"https://github.com/endlessm/mogwai","homepage":null,"size":558,"stargazers_count":1,"watchers_count":1,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"lgpl-2.1","name":"GNU Lesser General Public License v2.1","spdx_id":"LGPL-2.1","url":"https://api.github.com/licenses/lgpl-2.1"},"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/endlessm/mogwai/pulls/50"},"html":{"href":"https://github.com/endlessm/mogwai/pull/50"},"issue":{"href":"https://api.github.com/repos/endlessm/mogwai/issues/50"},"comments":{"href":"https://api.github.com/repos/endlessm/mogwai/issues/50/comments"},"review_comments":{"href":"https://api.github.com/repos/endlessm/mogwai/pulls/50/comments"},"review_comment":{"href":"https://api.github.com/repos/endlessm/mogwai/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/endlessm/mogwai/pulls/50/commits"},"statuses":{"href":"https://api.github.com/repos/endlessm/mogwai/statuses/c96ba28fd3acecedf88e77ff5cdf0ac2664ec6c5"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"pwithnall"}}