{"action":"created","comment":{"url":"https://api.github.com/repos/Metaswitch/chronos/pulls/comments/30417825","id":30417825,"diff_hunk":"@@ -86,30 +86,27 @@ Globals::~Globals()\n void Globals::update_config()\n {\n   std::ifstream file;\n-  boost::program_options::variables_map conf_map;\n+  po::variables_map conf_map;\n \n-  // If the cluster configuration file isn't set, take the information from\n-  // the standard configuration file. Otherwise read it from the new file.\n+  // Read clustering config from _cluster_config_file and other config from\n+  // _config_file. Any remaining unset configuration options will be set to\n+  // their default values defined above when notify is called.\n   file.open(_cluster_config_file);\n   if (file.is_open())\n   {\n     po::store(po::parse_config_file(file, _desc), conf_map);\n-    po::notify(conf_map);\n     file.close();\n   }\n \n   file.open(_config_file);\n+  po::store(po::parse_config_file(file, _desc), conf_map);","path":"src/main/globals.cpp","position":21,"original_position":21,"commit_id":"864ab7c6acbfd4685927c816b692591e8b4b9a2b","original_commit_id":"864ab7c6acbfd4685927c816b692591e8b4b9a2b","user":{"login":"bossmc","id":1073983,"avatar_url":"https://avatars.githubusercontent.com/u/1073983?v=3","gravatar_id":"","url":"https://api.github.com/users/bossmc","html_url":"https://github.com/bossmc","followers_url":"https://api.github.com/users/bossmc/followers","following_url":"https://api.github.com/users/bossmc/following{/other_user}","gists_url":"https://api.github.com/users/bossmc/gists{/gist_id}","starred_url":"https://api.github.com/users/bossmc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bossmc/subscriptions","organizations_url":"https://api.github.com/users/bossmc/orgs","repos_url":"https://api.github.com/users/bossmc/repos","events_url":"https://api.github.com/users/bossmc/events{/privacy}","received_events_url":"https://api.github.com/users/bossmc/received_events","type":"User","site_admin":false},"body":"```\r\nfile.open(_config_file);\r\nif (file.open())\r\n{\r\n  po::store(po::parse_config_file(file, _desc), conf_map);\r\n  file.close();\r\n}\r\npo::notify(conf_map);\r\n```","created_at":"2015-05-15T15:23:55Z","updated_at":"2015-05-15T15:23:55Z","html_url":"https://github.com/Metaswitch/chronos/pull/127#discussion_r30417825","pull_request_url":"https://api.github.com/repos/Metaswitch/chronos/pulls/127","_links":{"self":{"href":"https://api.github.com/repos/Metaswitch/chronos/pulls/comments/30417825"},"html":{"href":"https://github.com/Metaswitch/chronos/pull/127#discussion_r30417825"},"pull_request":{"href":"https://api.github.com/repos/Metaswitch/chronos/pulls/127"}}},"pull_request":{"url":"https://api.github.com/repos/Metaswitch/chronos/pulls/127","id":35522146,"html_url":"https://github.com/Metaswitch/chronos/pull/127","diff_url":"https://github.com/Metaswitch/chronos/pull/127.diff","patch_url":"https://github.com/Metaswitch/chronos/pull/127.patch","issue_url":"https://api.github.com/repos/Metaswitch/chronos/issues/127","number":127,"state":"open","locked":false,"title":"Reviewer AMC: Set defaults if no config files are present","user":{"login":"graemerobertson","id":5907876,"avatar_url":"https://avatars.githubusercontent.com/u/5907876?v=3","gravatar_id":"","url":"https://api.github.com/users/graemerobertson","html_url":"https://github.com/graemerobertson","followers_url":"https://api.github.com/users/graemerobertson/followers","following_url":"https://api.github.com/users/graemerobertson/following{/other_user}","gists_url":"https://api.github.com/users/graemerobertson/gists{/gist_id}","starred_url":"https://api.github.com/users/graemerobertson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/graemerobertson/subscriptions","organizations_url":"https://api.github.com/users/graemerobertson/orgs","repos_url":"https://api.github.com/users/graemerobertson/repos","events_url":"https://api.github.com/users/graemerobertson/events{/privacy}","received_events_url":"https://api.github.com/users/graemerobertson/received_events","type":"User","site_admin":false},"body":"Fixes https://github.com/Metaswitch/chronos/issues/126.\r\n\r\nTested by running Chronos with no config files present, with just chronos.conf present and with both chronos.conf and chronos_cluster.conf present. Chronos started up with the correct options in each case.","created_at":"2015-05-15T15:16:37Z","updated_at":"2015-05-15T15:23:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a57737f5bc0774d3c0ea49bd7b5b1f4a22278035","assignee":{"login":"bossmc","id":1073983,"avatar_url":"https://avatars.githubusercontent.com/u/1073983?v=3","gravatar_id":"","url":"https://api.github.com/users/bossmc","html_url":"https://github.com/bossmc","followers_url":"https://api.github.com/users/bossmc/followers","following_url":"https://api.github.com/users/bossmc/following{/other_user}","gists_url":"https://api.github.com/users/bossmc/gists{/gist_id}","starred_url":"https://api.github.com/users/bossmc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bossmc/subscriptions","organizations_url":"https://api.github.com/users/bossmc/orgs","repos_url":"https://api.github.com/users/bossmc/repos","events_url":"https://api.github.com/users/bossmc/events{/privacy}","received_events_url":"https://api.github.com/users/bossmc/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/Metaswitch/chronos/pulls/127/commits","review_comments_url":"https://api.github.com/repos/Metaswitch/chronos/pulls/127/comments","review_comment_url":"https://api.github.com/repos/Metaswitch/chronos/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Metaswitch/chronos/issues/127/comments","statuses_url":"https://api.github.com/repos/Metaswitch/chronos/statuses/864ab7c6acbfd4685927c816b692591e8b4b9a2b","head":{"label":"Metaswitch:chronos_bind_addr","ref":"chronos_bind_addr","sha":"864ab7c6acbfd4685927c816b692591e8b4b9a2b","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":16410307,"name":"chronos","full_name":"Metaswitch/chronos","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/chronos","description":"A distributed, redundant, reliable timer service.","fork":false,"url":"https://api.github.com/repos/Metaswitch/chronos","forks_url":"https://api.github.com/repos/Metaswitch/chronos/forks","keys_url":"https://api.github.com/repos/Metaswitch/chronos/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Metaswitch/chronos/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Metaswitch/chronos/teams","hooks_url":"https://api.github.com/repos/Metaswitch/chronos/hooks","issue_events_url":"https://api.github.com/repos/Metaswitch/chronos/issues/events{/number}","events_url":"https://api.github.com/repos/Metaswitch/chronos/events","assignees_url":"https://api.github.com/repos/Metaswitch/chronos/assignees{/user}","branches_url":"https://api.github.com/repos/Metaswitch/chronos/branches{/branch}","tags_url":"https://api.github.com/repos/Metaswitch/chronos/tags","blobs_url":"https://api.github.com/repos/Metaswitch/chronos/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Metaswitch/chronos/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Metaswitch/chronos/git/refs{/sha}","trees_url":"https://api.github.com/repos/Metaswitch/chronos/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Metaswitch/chronos/statuses/{sha}","languages_url":"https://api.github.com/repos/Metaswitch/chronos/languages","stargazers_url":"https://api.github.com/repos/Metaswitch/chronos/stargazers","contributors_url":"https://api.github.com/repos/Metaswitch/chronos/contributors","subscribers_url":"https://api.github.com/repos/Metaswitch/chronos/subscribers","subscription_url":"https://api.github.com/repos/Metaswitch/chronos/subscription","commits_url":"https://api.github.com/repos/Metaswitch/chronos/commits{/sha}","git_commits_url":"https://api.github.com/repos/Metaswitch/chronos/git/commits{/sha}","comments_url":"https://api.github.com/repos/Metaswitch/chronos/comments{/number}","issue_comment_url":"https://api.github.com/repos/Metaswitch/chronos/issues/comments{/number}","contents_url":"https://api.github.com/repos/Metaswitch/chronos/contents/{+path}","compare_url":"https://api.github.com/repos/Metaswitch/chronos/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Metaswitch/chronos/merges","archive_url":"https://api.github.com/repos/Metaswitch/chronos/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Metaswitch/chronos/downloads","issues_url":"https://api.github.com/repos/Metaswitch/chronos/issues{/number}","pulls_url":"https://api.github.com/repos/Metaswitch/chronos/pulls{/number}","milestones_url":"https://api.github.com/repos/Metaswitch/chronos/milestones{/number}","notifications_url":"https://api.github.com/repos/Metaswitch/chronos/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Metaswitch/chronos/labels{/name}","releases_url":"https://api.github.com/repos/Metaswitch/chronos/releases{/id}","created_at":"2014-01-31T14:36:31Z","updated_at":"2015-05-07T12:02:24Z","pushed_at":"2015-05-15T15:16:38Z","git_url":"git://github.com/Metaswitch/chronos.git","ssh_url":"git@github.com:Metaswitch/chronos.git","clone_url":"https://github.com/Metaswitch/chronos.git","svn_url":"https://github.com/Metaswitch/chronos","homepage":null,"size":2567,"stargazers_count":2,"watchers_count":2,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":6,"forks":3,"open_issues":6,"watchers":2,"default_branch":"dev"}},"base":{"label":"Metaswitch:dev","ref":"dev","sha":"c3dedb380c326dd0313f755f2e318b6304bdcb26","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":16410307,"name":"chronos","full_name":"Metaswitch/chronos","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/chronos","description":"A distributed, redundant, reliable timer service.","fork":false,"url":"https://api.github.com/repos/Metaswitch/chronos","forks_url":"https://api.github.com/repos/Metaswitch/chronos/forks","keys_url":"https://api.github.com/repos/Metaswitch/chronos/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Metaswitch/chronos/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Metaswitch/chronos/teams","hooks_url":"https://api.github.com/repos/Metaswitch/chronos/hooks","issue_events_url":"https://api.github.com/repos/Metaswitch/chronos/issues/events{/number}","events_url":"https://api.github.com/repos/Metaswitch/chronos/events","assignees_url":"https://api.github.com/repos/Metaswitch/chronos/assignees{/user}","branches_url":"https://api.github.com/repos/Metaswitch/chronos/branches{/branch}","tags_url":"https://api.github.com/repos/Metaswitch/chronos/tags","blobs_url":"https://api.github.com/repos/Metaswitch/chronos/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Metaswitch/chronos/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Metaswitch/chronos/git/refs{/sha}","trees_url":"https://api.github.com/repos/Metaswitch/chronos/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Metaswitch/chronos/statuses/{sha}","languages_url":"https://api.github.com/repos/Metaswitch/chronos/languages","stargazers_url":"https://api.github.com/repos/Metaswitch/chronos/stargazers","contributors_url":"https://api.github.com/repos/Metaswitch/chronos/contributors","subscribers_url":"https://api.github.com/repos/Metaswitch/chronos/subscribers","subscription_url":"https://api.github.com/repos/Metaswitch/chronos/subscription","commits_url":"https://api.github.com/repos/Metaswitch/chronos/commits{/sha}","git_commits_url":"https://api.github.com/repos/Metaswitch/chronos/git/commits{/sha}","comments_url":"https://api.github.com/repos/Metaswitch/chronos/comments{/number}","issue_comment_url":"https://api.github.com/repos/Metaswitch/chronos/issues/comments{/number}","contents_url":"https://api.github.com/repos/Metaswitch/chronos/contents/{+path}","compare_url":"https://api.github.com/repos/Metaswitch/chronos/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Metaswitch/chronos/merges","archive_url":"https://api.github.com/repos/Metaswitch/chronos/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Metaswitch/chronos/downloads","issues_url":"https://api.github.com/repos/Metaswitch/chronos/issues{/number}","pulls_url":"https://api.github.com/repos/Metaswitch/chronos/pulls{/number}","milestones_url":"https://api.github.com/repos/Metaswitch/chronos/milestones{/number}","notifications_url":"https://api.github.com/repos/Metaswitch/chronos/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Metaswitch/chronos/labels{/name}","releases_url":"https://api.github.com/repos/Metaswitch/chronos/releases{/id}","created_at":"2014-01-31T14:36:31Z","updated_at":"2015-05-07T12:02:24Z","pushed_at":"2015-05-15T15:16:38Z","git_url":"git://github.com/Metaswitch/chronos.git","ssh_url":"git@github.com:Metaswitch/chronos.git","clone_url":"https://github.com/Metaswitch/chronos.git","svn_url":"https://github.com/Metaswitch/chronos","homepage":null,"size":2567,"stargazers_count":2,"watchers_count":2,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":6,"forks":3,"open_issues":6,"watchers":2,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/Metaswitch/chronos/pulls/127"},"html":{"href":"https://github.com/Metaswitch/chronos/pull/127"},"issue":{"href":"https://api.github.com/repos/Metaswitch/chronos/issues/127"},"comments":{"href":"https://api.github.com/repos/Metaswitch/chronos/issues/127/comments"},"review_comments":{"href":"https://api.github.com/repos/Metaswitch/chronos/pulls/127/comments"},"review_comment":{"href":"https://api.github.com/repos/Metaswitch/chronos/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Metaswitch/chronos/pulls/127/commits"},"statuses":{"href":"https://api.github.com/repos/Metaswitch/chronos/statuses/864ab7c6acbfd4685927c816b692591e8b4b9a2b"}}}}