{"action":"created","comment":{"url":"https://api.github.com/repos/net-amqp-rabbitmq/net-amqp-rabbitmq/pulls/comments/59396024","id":59396024,"diff_hunk":"@@ -41,16 +41,20 @@\n \n typedef amqp_connection_state_t Net__AMQP__RabbitMQ;\n \n-/* this is a place to put some stuff that we convert from perl, it's transient and we recycle it as soon as it's finished being used, which means we keep memory we've used with the aim of reusing it */\n-amqp_pool_t temp_memory_pool;\n-\n-//mashup of things to free memory, also temp_memory_pool is ugly and code smell\n-void maybe_recycle_memory(amqp_connection_state_t conn)\n-{\n-    if (amqp_release_buffers_ok(conn)) {\n-        amqp_release_buffers(conn);\n-        recycle_amqp_pool( &temp_memory_pool );\n-    }\n+#define AMQP_STATUS_UNKNOWN_TYPE 0x500\n+\n+/* This is a place to put some stuff that we convert from perl,\n+   it's transient and we recycle it as soon as it's finished being used\n+   which means we keep memory we've used with the aim of reusing it */\n+/* temp_memory_pool is ugly and suffers from code smell */\n+static amqp_pool_t temp_memory_pool;","path":"RabbitMQ.xs","position":20,"original_position":20,"commit_id":"f8c60a9f62a0d6dbadabf966d1960a76ccc1649d","original_commit_id":"f8c60a9f62a0d6dbadabf966d1960a76ccc1649d","user":{"login":"ikegami","id":699749,"avatar_url":"https://avatars.githubusercontent.com/u/699749?v=3","gravatar_id":"","url":"https://api.github.com/users/ikegami","html_url":"https://github.com/ikegami","followers_url":"https://api.github.com/users/ikegami/followers","following_url":"https://api.github.com/users/ikegami/following{/other_user}","gists_url":"https://api.github.com/users/ikegami/gists{/gist_id}","starred_url":"https://api.github.com/users/ikegami/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ikegami/subscriptions","organizations_url":"https://api.github.com/users/ikegami/orgs","repos_url":"https://api.github.com/users/ikegami/repos","events_url":"https://api.github.com/users/ikegami/events{/privacy}","received_events_url":"https://api.github.com/users/ikegami/received_events","type":"User","site_admin":false},"body":"Besides the fact that they should be static on principle -- a fundamental tenet of Computer Science is to limit access -- name collisions with other XS modules are possibles when using static linking.","created_at":"2016-04-12T15:24:08Z","updated_at":"2016-04-12T15:24:08Z","html_url":"https://github.com/net-amqp-rabbitmq/net-amqp-rabbitmq/pull/107#discussion_r59396024","pull_request_url":"https://api.github.com/repos/net-amqp-rabbitmq/net-amqp-rabbitmq/pulls/107","_links":{"self":{"href":"https://api.github.com/repos/net-amqp-rabbitmq/net-amqp-rabbitmq/pulls/comments/59396024"},"html":{"href":"https://github.com/net-amqp-rabbitmq/net-amqp-rabbitmq/pull/107#discussion_r59396024"},"pull_request":{"href":"https://api.github.com/repos/net-amqp-rabbitmq/net-amqp-rabbitmq/pulls/107"}}},"pull_request":{"url":"https://api.github.com/repos/net-amqp-rabbitmq/net-amqp-rabbitmq/pulls/107","id":65667643,"html_url":"https://github.com/net-amqp-rabbitmq/net-amqp-rabbitmq/pull/107","diff_url":"https://github.com/net-amqp-rabbitmq/net-amqp-rabbitmq/pull/107.diff","patch_url":"https://github.com/net-amqp-rabbitmq/net-amqp-rabbitmq/pull/107.patch","issue_url":"https://api.github.com/repos/net-amqp-rabbitmq/net-amqp-rabbitmq/issues/107","number":107,"state":"open","locked":false,"title":"Report exceptions from the RabbitMQ server.","user":{"login":"ikegami","id":699749,"avatar_url":"https://avatars.githubusercontent.com/u/699749?v=3","gravatar_id":"","url":"https://api.github.com/users/ikegami","html_url":"https://github.com/ikegami","followers_url":"https://api.github.com/users/ikegami/followers","following_url":"https://api.github.com/users/ikegami/following{/other_user}","gists_url":"https://api.github.com/users/ikegami/gists{/gist_id}","starred_url":"https://api.github.com/users/ikegami/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ikegami/subscriptions","organizations_url":"https://api.github.com/users/ikegami/orgs","repos_url":"https://api.github.com/users/ikegami/repos","events_url":"https://api.github.com/users/ikegami/events{/privacy}","received_events_url":"https://api.github.com/users/ikegami/received_events","type":"User","site_admin":false},"body":"This fixes https://github.com/net-amqp-rabbitmq/net-amqp-rabbitmq/issues/106\r\n\r\n[Requires/includes my earlier pull requests.]\r\n\r\nRabbitMQ calls the client's channel's close method (with an error message) when certain errors occur, such as after publishing a non-routable message. recv() ignored such calls instead of reporting the error.\r\n\r\nThis was done by replacing internal_recv() with a XS-ified version amqp_consume_message().\r\n\r\nThere were some benefits gained as a side-effect:\r\n- This fixes some memory leaks that occur when an exception is thrown.\r\n- This provides more consistent error messages.\r\n- Channel now included in frames returned by recv().\r\n","created_at":"2016-04-07T17:23:44Z","updated_at":"2016-04-12T15:24:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1ff9ac2b2677e415764e8e5f30621f51916e37b2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/net-amqp-rabbitmq/net-amqp-rabbitmq/pulls/107/commits","review_comments_url":"https://api.github.com/repos/net-amqp-rabbitmq/net-amqp-rabbitmq/pulls/107/comments","review_comment_url":"https://api.github.com/repos/net-amqp-rabbitmq/net-amqp-rabbitmq/pulls/comments{/number}","comments_url":"https://api.github.com/repos/net-amqp-rabbitmq/net-amqp-rabbitmq/issues/107/comments","statuses_url":"https://api.github.com/repos/net-amqp-rabbitmq/net-amqp-rabbitmq/statuses/f8c60a9f62a0d6dbadabf966d1960a76ccc1649d","head":{"label":"ikegami:issue-106","ref":"issue-106","sha":"f8c60a9f62a0d6dbadabf966d1960a76ccc1649d","user":{"login":"ikegami","id":699749,"avatar_url":"https://avatars.githubusercontent.com/u/699749?v=3","gravatar_id":"","url":"https://api.github.com/users/ikegami","html_url":"https://github.com/ikegami","followers_url":"https://api.github.com/users/ikegami/followers","following_url":"https://api.github.com/users/ikegami/following{/other_user}","gists_url":"https://api.github.com/users/ikegami/gists{/gist_id}","starred_url":"https://api.github.com/users/ikegami/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ikegami/subscriptions","organizations_url":"https://api.github.com/users/ikegami/orgs","repos_url":"https://api.github.com/users/ikegami/repos","events_url":"https://api.github.com/users/ikegami/events{/privacy}","received_events_url":"https://api.github.com/users/ikegami/received_events","type":"User","site_admin":false},"repo":{"id":55442347,"name":"net-amqp-rabbitmq","full_name":"ikegami/net-amqp-rabbitmq","owner":{"login":"ikegami","id":699749,"avatar_url":"https://avatars.githubusercontent.com/u/699749?v=3","gravatar_id":"","url":"https://api.github.com/users/ikegami","html_url":"https://github.com/ikegami","followers_url":"https://api.github.com/users/ikegami/followers","following_url":"https://api.github.com/users/ikegami/following{/other_user}","gists_url":"https://api.github.com/users/ikegami/gists{/gist_id}","starred_url":"https://api.github.com/users/ikegami/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ikegami/subscriptions","organizations_url":"https://api.github.com/users/ikegami/orgs","repos_url":"https://api.github.com/users/ikegami/repos","events_url":"https://api.github.com/users/ikegami/events{/privacy}","received_events_url":"https://api.github.com/users/ikegami/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ikegami/net-amqp-rabbitmq","description":"Perl bindings to the librabbitmq-c AMQP library.","fork":true,"url":"https://api.github.com/repos/ikegami/net-amqp-rabbitmq","forks_url":"https://api.github.com/repos/ikegami/net-amqp-rabbitmq/forks","keys_url":"https://api.github.com/repos/ikegami/net-amqp-rabbitmq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ikegami/net-amqp-rabbitmq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ikegami/net-amqp-rabbitmq/teams","hooks_url":"https://api.github.com/repos/ikegami/net-amqp-rabbitmq/hooks","issue_events_url":"https://api.github.com/repos/ikegami/net-amqp-rabbitmq/issues/events{/number}","events_url":"https://api.github.com/repos/ikegami/net-amqp-rabbitmq/events","assignees_url":"https://api.github.com/repos/ikegami/net-amqp-rabbitmq/assignees{/user}","branches_url":"https://api.github.com/repos/ikegami/net-amqp-rabbitmq/branches{/branch}","tags_url":"https://api.github.com/repos/ikegami/net-amqp-rabbitmq/tags","blobs_url":"https://api.github.com/repos/ikegami/net-amqp-rabbitmq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ikegami/net-amqp-rabbitmq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ikegami/net-amqp-rabbitmq/git/refs{/sha}","trees_url":"https://api.github.com/repos/ikegami/net-amqp-rabbitmq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ikegami/net-amqp-rabbitmq/statuses/{sha}","languages_url":"https://api.github.com/repos/ikegami/net-amqp-rabbitmq/languages","stargazers_url":"https://api.github.com/repos/ikegami/net-amqp-rabbitmq/stargazers","contributors_url":"https://api.github.com/repos/ikegami/net-amqp-rabbitmq/contributors","subscribers_url":"https://api.github.com/repos/ikegami/net-amqp-rabbitmq/subscribers","subscription_url":"https://api.github.com/repos/ikegami/net-amqp-rabbitmq/subscription","commits_url":"https://api.github.com/repos/ikegami/net-amqp-rabbitmq/commits{/sha}","git_commits_url":"https://api.github.com/repos/ikegami/net-amqp-rabbitmq/git/commits{/sha}","comments_url":"https://api.github.com/repos/ikegami/net-amqp-rabbitmq/comments{/number}","issue_comment_url":"https://api.github.com/repos/ikegami/net-amqp-rabbitmq/issues/comments{/number}","contents_url":"https://api.github.com/repos/ikegami/net-amqp-rabbitmq/contents/{+path}","compare_url":"https://api.github.com/repos/ikegami/net-amqp-rabbitmq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ikegami/net-amqp-rabbitmq/merges","archive_url":"https://api.github.com/repos/ikegami/net-amqp-rabbitmq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ikegami/net-amqp-rabbitmq/downloads","issues_url":"https://api.github.com/repos/ikegami/net-amqp-rabbitmq/issues{/number}","pulls_url":"https://api.github.com/repos/ikegami/net-amqp-rabbitmq/pulls{/number}","milestones_url":"https://api.github.com/repos/ikegami/net-amqp-rabbitmq/milestones{/number}","notifications_url":"https://api.github.com/repos/ikegami/net-amqp-rabbitmq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ikegami/net-amqp-rabbitmq/labels{/name}","releases_url":"https://api.github.com/repos/ikegami/net-amqp-rabbitmq/releases{/id}","deployments_url":"https://api.github.com/repos/ikegami/net-amqp-rabbitmq/deployments","created_at":"2016-04-04T20:26:20Z","updated_at":"2016-04-04T20:26:21Z","pushed_at":"2016-04-12T11:55:01Z","git_url":"git://github.com/ikegami/net-amqp-rabbitmq.git","ssh_url":"git@github.com:ikegami/net-amqp-rabbitmq.git","clone_url":"https://github.com/ikegami/net-amqp-rabbitmq.git","svn_url":"https://github.com/ikegami/net-amqp-rabbitmq","homepage":"","size":508,"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":"net-amqp-rabbitmq:master","ref":"master","sha":"03ce9b8d4669634d0ba75fdd160519f1b8bbcd47","user":{"login":"net-amqp-rabbitmq","id":14897406,"avatar_url":"https://avatars.githubusercontent.com/u/14897406?v=3","gravatar_id":"","url":"https://api.github.com/users/net-amqp-rabbitmq","html_url":"https://github.com/net-amqp-rabbitmq","followers_url":"https://api.github.com/users/net-amqp-rabbitmq/followers","following_url":"https://api.github.com/users/net-amqp-rabbitmq/following{/other_user}","gists_url":"https://api.github.com/users/net-amqp-rabbitmq/gists{/gist_id}","starred_url":"https://api.github.com/users/net-amqp-rabbitmq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/net-amqp-rabbitmq/subscriptions","organizations_url":"https://api.github.com/users/net-amqp-rabbitmq/orgs","repos_url":"https://api.github.com/users/net-amqp-rabbitmq/repos","events_url":"https://api.github.com/users/net-amqp-rabbitmq/events{/privacy}","received_events_url":"https://api.github.com/users/net-amqp-rabbitmq/received_events","type":"Organization","site_admin":false},"repo":{"id":15226599,"name":"net-amqp-rabbitmq","full_name":"net-amqp-rabbitmq/net-amqp-rabbitmq","owner":{"login":"net-amqp-rabbitmq","id":14897406,"avatar_url":"https://avatars.githubusercontent.com/u/14897406?v=3","gravatar_id":"","url":"https://api.github.com/users/net-amqp-rabbitmq","html_url":"https://github.com/net-amqp-rabbitmq","followers_url":"https://api.github.com/users/net-amqp-rabbitmq/followers","following_url":"https://api.github.com/users/net-amqp-rabbitmq/following{/other_user}","gists_url":"https://api.github.com/users/net-amqp-rabbitmq/gists{/gist_id}","starred_url":"https://api.github.com/users/net-amqp-rabbitmq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/net-amqp-rabbitmq/subscriptions","organizations_url":"https://api.github.com/users/net-amqp-rabbitmq/orgs","repos_url":"https://api.github.com/users/net-amqp-rabbitmq/repos","events_url":"https://api.github.com/users/net-amqp-rabbitmq/events{/privacy}","received_events_url":"https://api.github.com/users/net-amqp-rabbitmq/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/net-amqp-rabbitmq/net-amqp-rabbitmq","description":"Perl bindings to the librabbitmq-c AMQP library.","fork":false,"url":"https://api.github.com/repos/net-amqp-rabbitmq/net-amqp-rabbitmq","forks_url":"https://api.github.com/repos/net-amqp-rabbitmq/net-amqp-rabbitmq/forks","keys_url":"https://api.github.com/repos/net-amqp-rabbitmq/net-amqp-rabbitmq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/net-amqp-rabbitmq/net-amqp-rabbitmq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/net-amqp-rabbitmq/net-amqp-rabbitmq/teams","hooks_url":"https://api.github.com/repos/net-amqp-rabbitmq/net-amqp-rabbitmq/hooks","issue_events_url":"https://api.github.com/repos/net-amqp-rabbitmq/net-amqp-rabbitmq/issues/events{/number}","events_url":"https://api.github.com/repos/net-amqp-rabbitmq/net-amqp-rabbitmq/events","assignees_url":"https://api.github.com/repos/net-amqp-rabbitmq/net-amqp-rabbitmq/assignees{/user}","branches_url":"https://api.github.com/repos/net-amqp-rabbitmq/net-amqp-rabbitmq/branches{/branch}","tags_url":"https://api.github.com/repos/net-amqp-rabbitmq/net-amqp-rabbitmq/tags","blobs_url":"https://api.github.com/repos/net-amqp-rabbitmq/net-amqp-rabbitmq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/net-amqp-rabbitmq/net-amqp-rabbitmq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/net-amqp-rabbitmq/net-amqp-rabbitmq/git/refs{/sha}","trees_url":"https://api.github.com/repos/net-amqp-rabbitmq/net-amqp-rabbitmq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/net-amqp-rabbitmq/net-amqp-rabbitmq/statuses/{sha}","languages_url":"https://api.github.com/repos/net-amqp-rabbitmq/net-amqp-rabbitmq/languages","stargazers_url":"https://api.github.com/repos/net-amqp-rabbitmq/net-amqp-rabbitmq/stargazers","contributors_url":"https://api.github.com/repos/net-amqp-rabbitmq/net-amqp-rabbitmq/contributors","subscribers_url":"https://api.github.com/repos/net-amqp-rabbitmq/net-amqp-rabbitmq/subscribers","subscription_url":"https://api.github.com/repos/net-amqp-rabbitmq/net-amqp-rabbitmq/subscription","commits_url":"https://api.github.com/repos/net-amqp-rabbitmq/net-amqp-rabbitmq/commits{/sha}","git_commits_url":"https://api.github.com/repos/net-amqp-rabbitmq/net-amqp-rabbitmq/git/commits{/sha}","comments_url":"https://api.github.com/repos/net-amqp-rabbitmq/net-amqp-rabbitmq/comments{/number}","issue_comment_url":"https://api.github.com/repos/net-amqp-rabbitmq/net-amqp-rabbitmq/issues/comments{/number}","contents_url":"https://api.github.com/repos/net-amqp-rabbitmq/net-amqp-rabbitmq/contents/{+path}","compare_url":"https://api.github.com/repos/net-amqp-rabbitmq/net-amqp-rabbitmq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/net-amqp-rabbitmq/net-amqp-rabbitmq/merges","archive_url":"https://api.github.com/repos/net-amqp-rabbitmq/net-amqp-rabbitmq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/net-amqp-rabbitmq/net-amqp-rabbitmq/downloads","issues_url":"https://api.github.com/repos/net-amqp-rabbitmq/net-amqp-rabbitmq/issues{/number}","pulls_url":"https://api.github.com/repos/net-amqp-rabbitmq/net-amqp-rabbitmq/pulls{/number}","milestones_url":"https://api.github.com/repos/net-amqp-rabbitmq/net-amqp-rabbitmq/milestones{/number}","notifications_url":"https://api.github.com/repos/net-amqp-rabbitmq/net-amqp-rabbitmq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/net-amqp-rabbitmq/net-amqp-rabbitmq/labels{/name}","releases_url":"https://api.github.com/repos/net-amqp-rabbitmq/net-amqp-rabbitmq/releases{/id}","deployments_url":"https://api.github.com/repos/net-amqp-rabbitmq/net-amqp-rabbitmq/deployments","created_at":"2013-12-16T13:34:25Z","updated_at":"2015-10-11T13:00:35Z","pushed_at":"2016-04-12T11:55:01Z","git_url":"git://github.com/net-amqp-rabbitmq/net-amqp-rabbitmq.git","ssh_url":"git@github.com:net-amqp-rabbitmq/net-amqp-rabbitmq.git","clone_url":"https://github.com/net-amqp-rabbitmq/net-amqp-rabbitmq.git","svn_url":"https://github.com/net-amqp-rabbitmq/net-amqp-rabbitmq","homepage":"","size":524,"stargazers_count":16,"watchers_count":16,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":20,"mirror_url":null,"open_issues_count":16,"forks":20,"open_issues":16,"watchers":16,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/net-amqp-rabbitmq/net-amqp-rabbitmq/pulls/107"},"html":{"href":"https://github.com/net-amqp-rabbitmq/net-amqp-rabbitmq/pull/107"},"issue":{"href":"https://api.github.com/repos/net-amqp-rabbitmq/net-amqp-rabbitmq/issues/107"},"comments":{"href":"https://api.github.com/repos/net-amqp-rabbitmq/net-amqp-rabbitmq/issues/107/comments"},"review_comments":{"href":"https://api.github.com/repos/net-amqp-rabbitmq/net-amqp-rabbitmq/pulls/107/comments"},"review_comment":{"href":"https://api.github.com/repos/net-amqp-rabbitmq/net-amqp-rabbitmq/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/net-amqp-rabbitmq/net-amqp-rabbitmq/pulls/107/commits"},"statuses":{"href":"https://api.github.com/repos/net-amqp-rabbitmq/net-amqp-rabbitmq/statuses/f8c60a9f62a0d6dbadabf966d1960a76ccc1649d"}}}}