{"action":"opened","number":1243,"pull_request":{"url":"https://api.github.com/repos/tux3/qTox/pulls/1243","id":29718043,"html_url":"https://github.com/tux3/qTox/pull/1243","diff_url":"https://github.com/tux3/qTox/pull/1243.diff","patch_url":"https://github.com/tux3/qTox/pull/1243.patch","issue_url":"https://api.github.com/repos/tux3/qTox/issues/1243","number":1243,"state":"open","locked":false,"title":"IPC rework and #840 fix","user":{"login":"novist","id":7602544,"avatar_url":"https://avatars.githubusercontent.com/u/7602544?v=3","gravatar_id":"","url":"https://api.github.com/users/novist","html_url":"https://github.com/novist","followers_url":"https://api.github.com/users/novist/followers","following_url":"https://api.github.com/users/novist/following{/other_user}","gists_url":"https://api.github.com/users/novist/gists{/gist_id}","starred_url":"https://api.github.com/users/novist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/novist/subscriptions","organizations_url":"https://api.github.com/users/novist/orgs","repos_url":"https://api.github.com/users/novist/repos","events_url":"https://api.github.com/users/novist/events{/privacy}","received_events_url":"https://api.github.com/users/novist/received_events","type":"User","site_admin":false},"body":"To fix #840 (yes, its not fixed even though its closed) i had to introduce new functionality to IPC and since it was a mess i rewrote it.\r\n\r\n### IPC highlights:\r\n#### Simpler design\r\nUses structs and arrays instead of magic offsets and memory pages. Now it is much easier to read/modify/maintain the code.\r\n\r\n#### Named events\r\nNow only handler of received event is called as opposed to calling all handlers and having them check data object to decide if they want to handle it or not. Now data object can hold more meaningful data.\r\n\r\n#### Additional functionality\r\nNow we can check if our event was handled and accepted. Main instance can handle event but in case handler returns ``false`` it will not count as accepted. Also we can send event to instance that runs specific profile. Last two features are important for fixing #840.\r\n\r\n#### #840 fix\r\nNow new instance launched with ``-p`` flag will send ``activate`` event to instance that runs profile specified with ``-p``. In case no instance handles such event then new instance with specified profile will be launched. If no ``-p`` flag is specified event is sent to main instance that is already running. If it is not running app starts normally.\r\n\r\nNote that i have changed global memory key to ``qtox-GIT_VERSION``. This is done because on unix systems shared memory may not be always released. In such case updating qtox to new version would crash because size of shared memory changes. Having unique key solves this problem.","created_at":"2015-02-20T18:19:33Z","updated_at":"2015-02-20T18:19:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/tux3/qTox/pulls/1243/commits","review_comments_url":"https://api.github.com/repos/tux3/qTox/pulls/1243/comments","review_comment_url":"https://api.github.com/repos/tux3/qTox/pulls/comments/{number}","comments_url":"https://api.github.com/repos/tux3/qTox/issues/1243/comments","statuses_url":"https://api.github.com/repos/tux3/qTox/statuses/a6574e474951135ea517f5bd8e71859b8b764d7a","head":{"label":"novist:autorun-fix","ref":"autorun-fix","sha":"a6574e474951135ea517f5bd8e71859b8b764d7a","user":{"login":"novist","id":7602544,"avatar_url":"https://avatars.githubusercontent.com/u/7602544?v=3","gravatar_id":"","url":"https://api.github.com/users/novist","html_url":"https://github.com/novist","followers_url":"https://api.github.com/users/novist/followers","following_url":"https://api.github.com/users/novist/following{/other_user}","gists_url":"https://api.github.com/users/novist/gists{/gist_id}","starred_url":"https://api.github.com/users/novist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/novist/subscriptions","organizations_url":"https://api.github.com/users/novist/orgs","repos_url":"https://api.github.com/users/novist/repos","events_url":"https://api.github.com/users/novist/events{/privacy}","received_events_url":"https://api.github.com/users/novist/received_events","type":"User","site_admin":false},"repo":{"id":27130007,"name":"qTox","full_name":"novist/qTox","owner":{"login":"novist","id":7602544,"avatar_url":"https://avatars.githubusercontent.com/u/7602544?v=3","gravatar_id":"","url":"https://api.github.com/users/novist","html_url":"https://github.com/novist","followers_url":"https://api.github.com/users/novist/followers","following_url":"https://api.github.com/users/novist/following{/other_user}","gists_url":"https://api.github.com/users/novist/gists{/gist_id}","starred_url":"https://api.github.com/users/novist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/novist/subscriptions","organizations_url":"https://api.github.com/users/novist/orgs","repos_url":"https://api.github.com/users/novist/repos","events_url":"https://api.github.com/users/novist/events{/privacy}","received_events_url":"https://api.github.com/users/novist/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/novist/qTox","description":"Powerful Tox client that follows the Tox design guidelines. Formerly called toxgui","fork":true,"url":"https://api.github.com/repos/novist/qTox","forks_url":"https://api.github.com/repos/novist/qTox/forks","keys_url":"https://api.github.com/repos/novist/qTox/keys{/key_id}","collaborators_url":"https://api.github.com/repos/novist/qTox/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/novist/qTox/teams","hooks_url":"https://api.github.com/repos/novist/qTox/hooks","issue_events_url":"https://api.github.com/repos/novist/qTox/issues/events{/number}","events_url":"https://api.github.com/repos/novist/qTox/events","assignees_url":"https://api.github.com/repos/novist/qTox/assignees{/user}","branches_url":"https://api.github.com/repos/novist/qTox/branches{/branch}","tags_url":"https://api.github.com/repos/novist/qTox/tags","blobs_url":"https://api.github.com/repos/novist/qTox/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/novist/qTox/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/novist/qTox/git/refs{/sha}","trees_url":"https://api.github.com/repos/novist/qTox/git/trees{/sha}","statuses_url":"https://api.github.com/repos/novist/qTox/statuses/{sha}","languages_url":"https://api.github.com/repos/novist/qTox/languages","stargazers_url":"https://api.github.com/repos/novist/qTox/stargazers","contributors_url":"https://api.github.com/repos/novist/qTox/contributors","subscribers_url":"https://api.github.com/repos/novist/qTox/subscribers","subscription_url":"https://api.github.com/repos/novist/qTox/subscription","commits_url":"https://api.github.com/repos/novist/qTox/commits{/sha}","git_commits_url":"https://api.github.com/repos/novist/qTox/git/commits{/sha}","comments_url":"https://api.github.com/repos/novist/qTox/comments{/number}","issue_comment_url":"https://api.github.com/repos/novist/qTox/issues/comments/{number}","contents_url":"https://api.github.com/repos/novist/qTox/contents/{+path}","compare_url":"https://api.github.com/repos/novist/qTox/compare/{base}...{head}","merges_url":"https://api.github.com/repos/novist/qTox/merges","archive_url":"https://api.github.com/repos/novist/qTox/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/novist/qTox/downloads","issues_url":"https://api.github.com/repos/novist/qTox/issues{/number}","pulls_url":"https://api.github.com/repos/novist/qTox/pulls{/number}","milestones_url":"https://api.github.com/repos/novist/qTox/milestones{/number}","notifications_url":"https://api.github.com/repos/novist/qTox/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/novist/qTox/labels{/name}","releases_url":"https://api.github.com/repos/novist/qTox/releases{/id}","created_at":"2014-11-25T14:41:55Z","updated_at":"2015-01-21T13:06:08Z","pushed_at":"2015-02-20T18:14:43Z","git_url":"git://github.com/novist/qTox.git","ssh_url":"git@github.com:novist/qTox.git","clone_url":"https://github.com/novist/qTox.git","svn_url":"https://github.com/novist/qTox","homepage":"http://utoxisfinished.info","size":10466,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"tux3:master","ref":"master","sha":"244d6daca88f0d79f29d9999dd74bd27ebd65780","user":{"login":"tux3","id":5155966,"avatar_url":"https://avatars.githubusercontent.com/u/5155966?v=3","gravatar_id":"","url":"https://api.github.com/users/tux3","html_url":"https://github.com/tux3","followers_url":"https://api.github.com/users/tux3/followers","following_url":"https://api.github.com/users/tux3/following{/other_user}","gists_url":"https://api.github.com/users/tux3/gists{/gist_id}","starred_url":"https://api.github.com/users/tux3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tux3/subscriptions","organizations_url":"https://api.github.com/users/tux3/orgs","repos_url":"https://api.github.com/users/tux3/repos","events_url":"https://api.github.com/users/tux3/events{/privacy}","received_events_url":"https://api.github.com/users/tux3/received_events","type":"User","site_admin":false},"repo":{"id":21179164,"name":"qTox","full_name":"tux3/qTox","owner":{"login":"tux3","id":5155966,"avatar_url":"https://avatars.githubusercontent.com/u/5155966?v=3","gravatar_id":"","url":"https://api.github.com/users/tux3","html_url":"https://github.com/tux3","followers_url":"https://api.github.com/users/tux3/followers","following_url":"https://api.github.com/users/tux3/following{/other_user}","gists_url":"https://api.github.com/users/tux3/gists{/gist_id}","starred_url":"https://api.github.com/users/tux3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tux3/subscriptions","organizations_url":"https://api.github.com/users/tux3/orgs","repos_url":"https://api.github.com/users/tux3/repos","events_url":"https://api.github.com/users/tux3/events{/privacy}","received_events_url":"https://api.github.com/users/tux3/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tux3/qTox","description":"Powerful Tox client that follows the Tox design guidelines. Formerly called toxgui","fork":false,"url":"https://api.github.com/repos/tux3/qTox","forks_url":"https://api.github.com/repos/tux3/qTox/forks","keys_url":"https://api.github.com/repos/tux3/qTox/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tux3/qTox/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tux3/qTox/teams","hooks_url":"https://api.github.com/repos/tux3/qTox/hooks","issue_events_url":"https://api.github.com/repos/tux3/qTox/issues/events{/number}","events_url":"https://api.github.com/repos/tux3/qTox/events","assignees_url":"https://api.github.com/repos/tux3/qTox/assignees{/user}","branches_url":"https://api.github.com/repos/tux3/qTox/branches{/branch}","tags_url":"https://api.github.com/repos/tux3/qTox/tags","blobs_url":"https://api.github.com/repos/tux3/qTox/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tux3/qTox/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tux3/qTox/git/refs{/sha}","trees_url":"https://api.github.com/repos/tux3/qTox/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tux3/qTox/statuses/{sha}","languages_url":"https://api.github.com/repos/tux3/qTox/languages","stargazers_url":"https://api.github.com/repos/tux3/qTox/stargazers","contributors_url":"https://api.github.com/repos/tux3/qTox/contributors","subscribers_url":"https://api.github.com/repos/tux3/qTox/subscribers","subscription_url":"https://api.github.com/repos/tux3/qTox/subscription","commits_url":"https://api.github.com/repos/tux3/qTox/commits{/sha}","git_commits_url":"https://api.github.com/repos/tux3/qTox/git/commits{/sha}","comments_url":"https://api.github.com/repos/tux3/qTox/comments{/number}","issue_comment_url":"https://api.github.com/repos/tux3/qTox/issues/comments/{number}","contents_url":"https://api.github.com/repos/tux3/qTox/contents/{+path}","compare_url":"https://api.github.com/repos/tux3/qTox/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tux3/qTox/merges","archive_url":"https://api.github.com/repos/tux3/qTox/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tux3/qTox/downloads","issues_url":"https://api.github.com/repos/tux3/qTox/issues{/number}","pulls_url":"https://api.github.com/repos/tux3/qTox/pulls{/number}","milestones_url":"https://api.github.com/repos/tux3/qTox/milestones{/number}","notifications_url":"https://api.github.com/repos/tux3/qTox/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tux3/qTox/labels{/name}","releases_url":"https://api.github.com/repos/tux3/qTox/releases{/id}","created_at":"2014-06-24T20:09:04Z","updated_at":"2015-02-20T17:52:15Z","pushed_at":"2015-02-20T02:30:57Z","git_url":"git://github.com/tux3/qTox.git","ssh_url":"git@github.com:tux3/qTox.git","clone_url":"https://github.com/tux3/qTox.git","svn_url":"https://github.com/tux3/qTox","homepage":"http://utoxisfinished.info","size":20680,"stargazers_count":329,"watchers_count":329,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":102,"mirror_url":null,"open_issues_count":250,"forks":102,"open_issues":250,"watchers":329,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tux3/qTox/pulls/1243"},"html":{"href":"https://github.com/tux3/qTox/pull/1243"},"issue":{"href":"https://api.github.com/repos/tux3/qTox/issues/1243"},"comments":{"href":"https://api.github.com/repos/tux3/qTox/issues/1243/comments"},"review_comments":{"href":"https://api.github.com/repos/tux3/qTox/pulls/1243/comments"},"review_comment":{"href":"https://api.github.com/repos/tux3/qTox/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/tux3/qTox/pulls/1243/commits"},"statuses":{"href":"https://api.github.com/repos/tux3/qTox/statuses/a6574e474951135ea517f5bd8e71859b8b764d7a"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":2,"additions":270,"deletions":218,"changed_files":11}}