{"action":"created","comment":{"url":"https://api.github.com/repos/balabit/syslog-ng/pulls/comments/41234961","id":41234961,"diff_hunk":"@@ -358,18 +430,55 @@ afprogram_dd_init(LogPipe *s)\n     }\n   log_pipe_append(&self->super.super.super, (LogPipe *) self->writer);\n \n-  return afprogram_dd_reopen(self);\n+  return restore_successful ? TRUE : afprogram_dd_reopen(self);\n+}\n+\n+static inline void\n+afprogram_dd_store_reload_info(AFProgramDestDriver * const self, GlobalConfig * const cfg)\n+{","path":"modules/afprog/afprog.c","position":195,"original_position":183,"commit_id":"459ffeec83e97ce636a2b0ba284d4ff6f23c68b1","original_commit_id":"4a71c317bd081d71dff1ec36afa68d8a61ff82c2","user":{"login":"bazsi","id":714102,"avatar_url":"https://avatars.githubusercontent.com/u/714102?v=3","gravatar_id":"","url":"https://api.github.com/users/bazsi","html_url":"https://github.com/bazsi","followers_url":"https://api.github.com/users/bazsi/followers","following_url":"https://api.github.com/users/bazsi/following{/other_user}","gists_url":"https://api.github.com/users/bazsi/gists{/gist_id}","starred_url":"https://api.github.com/users/bazsi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bazsi/subscriptions","organizations_url":"https://api.github.com/users/bazsi/orgs","repos_url":"https://api.github.com/users/bazsi/repos","events_url":"https://api.github.com/users/bazsi/events{/privacy}","received_events_url":"https://api.github.com/users/bazsi/received_events","type":"User","site_admin":false},"body":"I don't really see the added value in specifying that self and cfg as a\npointer is const. It is an implementation detail of the function and\ndoesn't need visibility outside.\n\nWe are not using this convention anywhere and I wouldn't start it now. I\ncan be convinced of course (as always), but there should be a tangible\nbenefit.\n\n\n-- \nBazsi\n\nOn Mon, Oct 5, 2015 at 5:58 PM, MÓZES Ádám István <notifications@github.com>\nwrote:\n\n> In modules/afprog/afprog.c\n> <https://github.com/balabit/syslog-ng/pull/722#discussion_r41161499>:\n>\n> > @@ -358,18 +430,55 @@ afprogram_dd_init(LogPipe *s)\n> >      }\n> >    log_pipe_append(&self->super.super.super, (LogPipe *) self->writer);\n> >\n> > -  return afprogram_dd_reopen(self);\n> > +  return restore_successful ? TRUE : afprogram_dd_reopen(self);\n> > +}\n> > +\n> > +static inline void\n> > +afprogram_dd_store_reload_info(AFProgramDestDriver * const self, GlobalConfig * const cfg)\n> > +{\n>\n> The C++ const convention\n> <https://en.wikipedia.org/wiki/Const_%28computer_programming%29#C.2B.2B_convention>\n> is used here, so in this case the pointer is qualified as a const, not to\n> the referenced type.\n> On the other hand, I would attach the asterisk to the type, but this is\n> not common in the current codebase.\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/balabit/syslog-ng/pull/722/files#r41161499>.\n>\n","created_at":"2015-10-06T08:05:28Z","updated_at":"2015-10-06T08:05:28Z","html_url":"https://github.com/balabit/syslog-ng/pull/722#discussion_r41234961","pull_request_url":"https://api.github.com/repos/balabit/syslog-ng/pulls/722","_links":{"self":{"href":"https://api.github.com/repos/balabit/syslog-ng/pulls/comments/41234961"},"html":{"href":"https://github.com/balabit/syslog-ng/pull/722#discussion_r41234961"},"pull_request":{"href":"https://api.github.com/repos/balabit/syslog-ng/pulls/722"}}},"pull_request":{"url":"https://api.github.com/repos/balabit/syslog-ng/pulls/722","id":46587525,"html_url":"https://github.com/balabit/syslog-ng/pull/722","diff_url":"https://github.com/balabit/syslog-ng/pull/722.diff","patch_url":"https://github.com/balabit/syslog-ng/pull/722.patch","issue_url":"https://api.github.com/repos/balabit/syslog-ng/issues/722","number":722,"state":"open","locked":false,"title":"Keep the program destination open between configuration reloads","user":{"login":"dnsjts","id":4162547,"avatar_url":"https://avatars.githubusercontent.com/u/4162547?v=3","gravatar_id":"","url":"https://api.github.com/users/dnsjts","html_url":"https://github.com/dnsjts","followers_url":"https://api.github.com/users/dnsjts/followers","following_url":"https://api.github.com/users/dnsjts/following{/other_user}","gists_url":"https://api.github.com/users/dnsjts/gists{/gist_id}","starred_url":"https://api.github.com/users/dnsjts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dnsjts/subscriptions","organizations_url":"https://api.github.com/users/dnsjts/orgs","repos_url":"https://api.github.com/users/dnsjts/repos","events_url":"https://api.github.com/users/dnsjts/events{/privacy}","received_events_url":"https://api.github.com/users/dnsjts/received_events","type":"User","site_admin":false},"body":"This pull request adds the possibility of letting the program destination unclosed and reused between configuration reloads.\r\n\r\nNew option: `keep_alive(x)`, where `x` is either `yes` or `no`.\r\nThe default behaviour has not been changed.","created_at":"2015-10-01T23:00:49Z","updated_at":"2015-10-06T08:05:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"072ba8e944d5abbb9e606449f0293052513a8e52","assignee":{"login":"dnsjts","id":4162547,"avatar_url":"https://avatars.githubusercontent.com/u/4162547?v=3","gravatar_id":"","url":"https://api.github.com/users/dnsjts","html_url":"https://github.com/dnsjts","followers_url":"https://api.github.com/users/dnsjts/followers","following_url":"https://api.github.com/users/dnsjts/following{/other_user}","gists_url":"https://api.github.com/users/dnsjts/gists{/gist_id}","starred_url":"https://api.github.com/users/dnsjts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dnsjts/subscriptions","organizations_url":"https://api.github.com/users/dnsjts/orgs","repos_url":"https://api.github.com/users/dnsjts/repos","events_url":"https://api.github.com/users/dnsjts/events{/privacy}","received_events_url":"https://api.github.com/users/dnsjts/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/balabit/syslog-ng/pulls/722/commits","review_comments_url":"https://api.github.com/repos/balabit/syslog-ng/pulls/722/comments","review_comment_url":"https://api.github.com/repos/balabit/syslog-ng/pulls/comments{/number}","comments_url":"https://api.github.com/repos/balabit/syslog-ng/issues/722/comments","statuses_url":"https://api.github.com/repos/balabit/syslog-ng/statuses/459ffeec83e97ce636a2b0ba284d4ff6f23c68b1","head":{"label":"dnsjts:program-stay-alive","ref":"program-stay-alive","sha":"459ffeec83e97ce636a2b0ba284d4ff6f23c68b1","user":{"login":"dnsjts","id":4162547,"avatar_url":"https://avatars.githubusercontent.com/u/4162547?v=3","gravatar_id":"","url":"https://api.github.com/users/dnsjts","html_url":"https://github.com/dnsjts","followers_url":"https://api.github.com/users/dnsjts/followers","following_url":"https://api.github.com/users/dnsjts/following{/other_user}","gists_url":"https://api.github.com/users/dnsjts/gists{/gist_id}","starred_url":"https://api.github.com/users/dnsjts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dnsjts/subscriptions","organizations_url":"https://api.github.com/users/dnsjts/orgs","repos_url":"https://api.github.com/users/dnsjts/repos","events_url":"https://api.github.com/users/dnsjts/events{/privacy}","received_events_url":"https://api.github.com/users/dnsjts/received_events","type":"User","site_admin":false},"repo":{"id":31538279,"name":"syslog-ng","full_name":"dnsjts/syslog-ng","owner":{"login":"dnsjts","id":4162547,"avatar_url":"https://avatars.githubusercontent.com/u/4162547?v=3","gravatar_id":"","url":"https://api.github.com/users/dnsjts","html_url":"https://github.com/dnsjts","followers_url":"https://api.github.com/users/dnsjts/followers","following_url":"https://api.github.com/users/dnsjts/following{/other_user}","gists_url":"https://api.github.com/users/dnsjts/gists{/gist_id}","starred_url":"https://api.github.com/users/dnsjts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dnsjts/subscriptions","organizations_url":"https://api.github.com/users/dnsjts/orgs","repos_url":"https://api.github.com/users/dnsjts/repos","events_url":"https://api.github.com/users/dnsjts/events{/privacy}","received_events_url":"https://api.github.com/users/dnsjts/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dnsjts/syslog-ng","description":"syslog-ng is an enhanced log daemon, supporting a wide range of input and output methods: syslog, unstructured text, queueing, SQL & NoSQL.","fork":true,"url":"https://api.github.com/repos/dnsjts/syslog-ng","forks_url":"https://api.github.com/repos/dnsjts/syslog-ng/forks","keys_url":"https://api.github.com/repos/dnsjts/syslog-ng/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dnsjts/syslog-ng/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dnsjts/syslog-ng/teams","hooks_url":"https://api.github.com/repos/dnsjts/syslog-ng/hooks","issue_events_url":"https://api.github.com/repos/dnsjts/syslog-ng/issues/events{/number}","events_url":"https://api.github.com/repos/dnsjts/syslog-ng/events","assignees_url":"https://api.github.com/repos/dnsjts/syslog-ng/assignees{/user}","branches_url":"https://api.github.com/repos/dnsjts/syslog-ng/branches{/branch}","tags_url":"https://api.github.com/repos/dnsjts/syslog-ng/tags","blobs_url":"https://api.github.com/repos/dnsjts/syslog-ng/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dnsjts/syslog-ng/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dnsjts/syslog-ng/git/refs{/sha}","trees_url":"https://api.github.com/repos/dnsjts/syslog-ng/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dnsjts/syslog-ng/statuses/{sha}","languages_url":"https://api.github.com/repos/dnsjts/syslog-ng/languages","stargazers_url":"https://api.github.com/repos/dnsjts/syslog-ng/stargazers","contributors_url":"https://api.github.com/repos/dnsjts/syslog-ng/contributors","subscribers_url":"https://api.github.com/repos/dnsjts/syslog-ng/subscribers","subscription_url":"https://api.github.com/repos/dnsjts/syslog-ng/subscription","commits_url":"https://api.github.com/repos/dnsjts/syslog-ng/commits{/sha}","git_commits_url":"https://api.github.com/repos/dnsjts/syslog-ng/git/commits{/sha}","comments_url":"https://api.github.com/repos/dnsjts/syslog-ng/comments{/number}","issue_comment_url":"https://api.github.com/repos/dnsjts/syslog-ng/issues/comments{/number}","contents_url":"https://api.github.com/repos/dnsjts/syslog-ng/contents/{+path}","compare_url":"https://api.github.com/repos/dnsjts/syslog-ng/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dnsjts/syslog-ng/merges","archive_url":"https://api.github.com/repos/dnsjts/syslog-ng/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dnsjts/syslog-ng/downloads","issues_url":"https://api.github.com/repos/dnsjts/syslog-ng/issues{/number}","pulls_url":"https://api.github.com/repos/dnsjts/syslog-ng/pulls{/number}","milestones_url":"https://api.github.com/repos/dnsjts/syslog-ng/milestones{/number}","notifications_url":"https://api.github.com/repos/dnsjts/syslog-ng/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dnsjts/syslog-ng/labels{/name}","releases_url":"https://api.github.com/repos/dnsjts/syslog-ng/releases{/id}","created_at":"2015-03-02T12:00:57Z","updated_at":"2015-05-12T09:30:47Z","pushed_at":"2015-10-05T19:08:39Z","git_url":"git://github.com/dnsjts/syslog-ng.git","ssh_url":"git@github.com:dnsjts/syslog-ng.git","clone_url":"https://github.com/dnsjts/syslog-ng.git","svn_url":"https://github.com/dnsjts/syslog-ng","homepage":"http://www.syslog-ng.org/","size":16967,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"balabit:master","ref":"master","sha":"17dbf41cfff5581ea5f519642a62b8a22db5f21c","user":{"login":"balabit","id":986981,"avatar_url":"https://avatars.githubusercontent.com/u/986981?v=3","gravatar_id":"","url":"https://api.github.com/users/balabit","html_url":"https://github.com/balabit","followers_url":"https://api.github.com/users/balabit/followers","following_url":"https://api.github.com/users/balabit/following{/other_user}","gists_url":"https://api.github.com/users/balabit/gists{/gist_id}","starred_url":"https://api.github.com/users/balabit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/balabit/subscriptions","organizations_url":"https://api.github.com/users/balabit/orgs","repos_url":"https://api.github.com/users/balabit/repos","events_url":"https://api.github.com/users/balabit/events{/privacy}","received_events_url":"https://api.github.com/users/balabit/received_events","type":"Organization","site_admin":false},"repo":{"id":14146757,"name":"syslog-ng","full_name":"balabit/syslog-ng","owner":{"login":"balabit","id":986981,"avatar_url":"https://avatars.githubusercontent.com/u/986981?v=3","gravatar_id":"","url":"https://api.github.com/users/balabit","html_url":"https://github.com/balabit","followers_url":"https://api.github.com/users/balabit/followers","following_url":"https://api.github.com/users/balabit/following{/other_user}","gists_url":"https://api.github.com/users/balabit/gists{/gist_id}","starred_url":"https://api.github.com/users/balabit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/balabit/subscriptions","organizations_url":"https://api.github.com/users/balabit/orgs","repos_url":"https://api.github.com/users/balabit/repos","events_url":"https://api.github.com/users/balabit/events{/privacy}","received_events_url":"https://api.github.com/users/balabit/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/balabit/syslog-ng","description":"syslog-ng is an enhanced log daemon, supporting a wide range of input and output methods: syslog, unstructured text, queueing, SQL & NoSQL.","fork":false,"url":"https://api.github.com/repos/balabit/syslog-ng","forks_url":"https://api.github.com/repos/balabit/syslog-ng/forks","keys_url":"https://api.github.com/repos/balabit/syslog-ng/keys{/key_id}","collaborators_url":"https://api.github.com/repos/balabit/syslog-ng/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/balabit/syslog-ng/teams","hooks_url":"https://api.github.com/repos/balabit/syslog-ng/hooks","issue_events_url":"https://api.github.com/repos/balabit/syslog-ng/issues/events{/number}","events_url":"https://api.github.com/repos/balabit/syslog-ng/events","assignees_url":"https://api.github.com/repos/balabit/syslog-ng/assignees{/user}","branches_url":"https://api.github.com/repos/balabit/syslog-ng/branches{/branch}","tags_url":"https://api.github.com/repos/balabit/syslog-ng/tags","blobs_url":"https://api.github.com/repos/balabit/syslog-ng/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/balabit/syslog-ng/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/balabit/syslog-ng/git/refs{/sha}","trees_url":"https://api.github.com/repos/balabit/syslog-ng/git/trees{/sha}","statuses_url":"https://api.github.com/repos/balabit/syslog-ng/statuses/{sha}","languages_url":"https://api.github.com/repos/balabit/syslog-ng/languages","stargazers_url":"https://api.github.com/repos/balabit/syslog-ng/stargazers","contributors_url":"https://api.github.com/repos/balabit/syslog-ng/contributors","subscribers_url":"https://api.github.com/repos/balabit/syslog-ng/subscribers","subscription_url":"https://api.github.com/repos/balabit/syslog-ng/subscription","commits_url":"https://api.github.com/repos/balabit/syslog-ng/commits{/sha}","git_commits_url":"https://api.github.com/repos/balabit/syslog-ng/git/commits{/sha}","comments_url":"https://api.github.com/repos/balabit/syslog-ng/comments{/number}","issue_comment_url":"https://api.github.com/repos/balabit/syslog-ng/issues/comments{/number}","contents_url":"https://api.github.com/repos/balabit/syslog-ng/contents/{+path}","compare_url":"https://api.github.com/repos/balabit/syslog-ng/compare/{base}...{head}","merges_url":"https://api.github.com/repos/balabit/syslog-ng/merges","archive_url":"https://api.github.com/repos/balabit/syslog-ng/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/balabit/syslog-ng/downloads","issues_url":"https://api.github.com/repos/balabit/syslog-ng/issues{/number}","pulls_url":"https://api.github.com/repos/balabit/syslog-ng/pulls{/number}","milestones_url":"https://api.github.com/repos/balabit/syslog-ng/milestones{/number}","notifications_url":"https://api.github.com/repos/balabit/syslog-ng/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/balabit/syslog-ng/labels{/name}","releases_url":"https://api.github.com/repos/balabit/syslog-ng/releases{/id}","created_at":"2013-11-05T16:22:02Z","updated_at":"2015-10-06T02:44:09Z","pushed_at":"2015-10-05T19:08:40Z","git_url":"git://github.com/balabit/syslog-ng.git","ssh_url":"git@github.com:balabit/syslog-ng.git","clone_url":"https://github.com/balabit/syslog-ng.git","svn_url":"https://github.com/balabit/syslog-ng","homepage":"http://www.syslog-ng.org/","size":23978,"stargazers_count":167,"watchers_count":167,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":65,"mirror_url":null,"open_issues_count":126,"forks":65,"open_issues":126,"watchers":167,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/balabit/syslog-ng/pulls/722"},"html":{"href":"https://github.com/balabit/syslog-ng/pull/722"},"issue":{"href":"https://api.github.com/repos/balabit/syslog-ng/issues/722"},"comments":{"href":"https://api.github.com/repos/balabit/syslog-ng/issues/722/comments"},"review_comments":{"href":"https://api.github.com/repos/balabit/syslog-ng/pulls/722/comments"},"review_comment":{"href":"https://api.github.com/repos/balabit/syslog-ng/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/balabit/syslog-ng/pulls/722/commits"},"statuses":{"href":"https://api.github.com/repos/balabit/syslog-ng/statuses/459ffeec83e97ce636a2b0ba284d4ff6f23c68b1"}}}}