{"action":"created","comment":{"url":"https://api.github.com/repos/solettaproject/soletta/pulls/comments/57976631","id":57976631,"diff_hunk":"@@ -690,11 +696,55 @@ timeout_expired(struct sol_coap_server *server, struct outgoing *outgoing)\n     return expired;\n }\n \n+static int\n+prepare_buffer(struct outgoing *outgoing, struct sol_buffer *buffer)\n+{\n+    struct sol_coap_packet *header = outgoing->header;\n+    struct sol_coap_packet *payload = outgoing->pkt;\n+    uint16_t new_size, new_offset, old_offset;\n+    uint8_t new_tkl, old_tkl;\n+    uint8_t *buf_data;\n+    int r;\n+\n+    if (!header) {\n+        sol_buffer_init_flags(buffer, payload->buf.data, payload->buf.used,\n+            SOL_BUFFER_FLAGS_MEMORY_NOT_OWNED);","path":"src/lib/comms/sol-coap.c","position":36,"original_position":36,"commit_id":"ee35564a89d01b572f5bbfec5cfd3580df616706","original_commit_id":"ee35564a89d01b572f5bbfec5cfd3580df616706","user":{"login":"vcgomes","id":1420,"avatar_url":"https://avatars.githubusercontent.com/u/1420?v=3","gravatar_id":"","url":"https://api.github.com/users/vcgomes","html_url":"https://github.com/vcgomes","followers_url":"https://api.github.com/users/vcgomes/followers","following_url":"https://api.github.com/users/vcgomes/following{/other_user}","gists_url":"https://api.github.com/users/vcgomes/gists{/gist_id}","starred_url":"https://api.github.com/users/vcgomes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vcgomes/subscriptions","organizations_url":"https://api.github.com/users/vcgomes/orgs","repos_url":"https://api.github.com/users/vcgomes/repos","events_url":"https://api.github.com/users/vcgomes/events{/privacy}","received_events_url":"https://api.github.com/users/vcgomes/received_events","type":"User","site_admin":false},"body":"Ugh. Sorry guys. My bad.","created_at":"2016-03-30T22:44:41Z","updated_at":"2016-03-30T22:44:41Z","html_url":"https://github.com/solettaproject/soletta/pull/1764#discussion_r57976631","pull_request_url":"https://api.github.com/repos/solettaproject/soletta/pulls/1764","_links":{"self":{"href":"https://api.github.com/repos/solettaproject/soletta/pulls/comments/57976631"},"html":{"href":"https://github.com/solettaproject/soletta/pull/1764#discussion_r57976631"},"pull_request":{"href":"https://api.github.com/repos/solettaproject/soletta/pulls/1764"}}},"pull_request":{"url":"https://api.github.com/repos/solettaproject/soletta/pulls/1764","id":64506438,"html_url":"https://github.com/solettaproject/soletta/pull/1764","diff_url":"https://github.com/solettaproject/soletta/pull/1764.diff","patch_url":"https://github.com/solettaproject/soletta/pull/1764.patch","issue_url":"https://api.github.com/repos/solettaproject/soletta/issues/1764","number":1764,"state":"open","locked":false,"title":"[Draft] sol-coap: Fix copying the payload for every notification","user":{"login":"vcgomes","id":1420,"avatar_url":"https://avatars.githubusercontent.com/u/1420?v=3","gravatar_id":"","url":"https://api.github.com/users/vcgomes","html_url":"https://github.com/vcgomes","followers_url":"https://api.github.com/users/vcgomes/followers","following_url":"https://api.github.com/users/vcgomes/following{/other_user}","gists_url":"https://api.github.com/users/vcgomes/gists{/gist_id}","starred_url":"https://api.github.com/users/vcgomes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vcgomes/subscriptions","organizations_url":"https://api.github.com/users/vcgomes/orgs","repos_url":"https://api.github.com/users/vcgomes/repos","events_url":"https://api.github.com/users/vcgomes/events{/privacy}","received_events_url":"https://api.github.com/users/vcgomes/received_events","type":"User","site_admin":false},"body":"Instead of copying the payload for every notification packet, we keep a\r\nreference for the payload, and have a copy of the header (that will\r\nchange according to each observer).\r\n\r\nSigned-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>","created_at":"2016-03-29T17:55:41Z","updated_at":"2016-03-30T22:44:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"da43142309d3a1443d6d7b2647181c4941cd35af","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/solettaproject/soletta/pulls/1764/commits","review_comments_url":"https://api.github.com/repos/solettaproject/soletta/pulls/1764/comments","review_comment_url":"https://api.github.com/repos/solettaproject/soletta/pulls/comments{/number}","comments_url":"https://api.github.com/repos/solettaproject/soletta/issues/1764/comments","statuses_url":"https://api.github.com/repos/solettaproject/soletta/statuses/ee35564a89d01b572f5bbfec5cfd3580df616706","head":{"label":"vcgomes:coap-notifications","ref":"coap-notifications","sha":"ee35564a89d01b572f5bbfec5cfd3580df616706","user":{"login":"vcgomes","id":1420,"avatar_url":"https://avatars.githubusercontent.com/u/1420?v=3","gravatar_id":"","url":"https://api.github.com/users/vcgomes","html_url":"https://github.com/vcgomes","followers_url":"https://api.github.com/users/vcgomes/followers","following_url":"https://api.github.com/users/vcgomes/following{/other_user}","gists_url":"https://api.github.com/users/vcgomes/gists{/gist_id}","starred_url":"https://api.github.com/users/vcgomes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vcgomes/subscriptions","organizations_url":"https://api.github.com/users/vcgomes/orgs","repos_url":"https://api.github.com/users/vcgomes/repos","events_url":"https://api.github.com/users/vcgomes/events{/privacy}","received_events_url":"https://api.github.com/users/vcgomes/received_events","type":"User","site_admin":false},"repo":{"id":37998119,"name":"soletta","full_name":"vcgomes/soletta","owner":{"login":"vcgomes","id":1420,"avatar_url":"https://avatars.githubusercontent.com/u/1420?v=3","gravatar_id":"","url":"https://api.github.com/users/vcgomes","html_url":"https://github.com/vcgomes","followers_url":"https://api.github.com/users/vcgomes/followers","following_url":"https://api.github.com/users/vcgomes/following{/other_user}","gists_url":"https://api.github.com/users/vcgomes/gists{/gist_id}","starred_url":"https://api.github.com/users/vcgomes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vcgomes/subscriptions","organizations_url":"https://api.github.com/users/vcgomes/orgs","repos_url":"https://api.github.com/users/vcgomes/repos","events_url":"https://api.github.com/users/vcgomes/events{/privacy}","received_events_url":"https://api.github.com/users/vcgomes/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vcgomes/soletta","description":"Soletta Project is a framework for making IoT devices.  With Soletta Project's libraries developers can easily write software for devices that control actuators/sensors and communicate using standard technologies. It enables adding smartness even on the smallest edge devices.  ","fork":true,"url":"https://api.github.com/repos/vcgomes/soletta","forks_url":"https://api.github.com/repos/vcgomes/soletta/forks","keys_url":"https://api.github.com/repos/vcgomes/soletta/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vcgomes/soletta/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vcgomes/soletta/teams","hooks_url":"https://api.github.com/repos/vcgomes/soletta/hooks","issue_events_url":"https://api.github.com/repos/vcgomes/soletta/issues/events{/number}","events_url":"https://api.github.com/repos/vcgomes/soletta/events","assignees_url":"https://api.github.com/repos/vcgomes/soletta/assignees{/user}","branches_url":"https://api.github.com/repos/vcgomes/soletta/branches{/branch}","tags_url":"https://api.github.com/repos/vcgomes/soletta/tags","blobs_url":"https://api.github.com/repos/vcgomes/soletta/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vcgomes/soletta/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vcgomes/soletta/git/refs{/sha}","trees_url":"https://api.github.com/repos/vcgomes/soletta/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vcgomes/soletta/statuses/{sha}","languages_url":"https://api.github.com/repos/vcgomes/soletta/languages","stargazers_url":"https://api.github.com/repos/vcgomes/soletta/stargazers","contributors_url":"https://api.github.com/repos/vcgomes/soletta/contributors","subscribers_url":"https://api.github.com/repos/vcgomes/soletta/subscribers","subscription_url":"https://api.github.com/repos/vcgomes/soletta/subscription","commits_url":"https://api.github.com/repos/vcgomes/soletta/commits{/sha}","git_commits_url":"https://api.github.com/repos/vcgomes/soletta/git/commits{/sha}","comments_url":"https://api.github.com/repos/vcgomes/soletta/comments{/number}","issue_comment_url":"https://api.github.com/repos/vcgomes/soletta/issues/comments{/number}","contents_url":"https://api.github.com/repos/vcgomes/soletta/contents/{+path}","compare_url":"https://api.github.com/repos/vcgomes/soletta/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vcgomes/soletta/merges","archive_url":"https://api.github.com/repos/vcgomes/soletta/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vcgomes/soletta/downloads","issues_url":"https://api.github.com/repos/vcgomes/soletta/issues{/number}","pulls_url":"https://api.github.com/repos/vcgomes/soletta/pulls{/number}","milestones_url":"https://api.github.com/repos/vcgomes/soletta/milestones{/number}","notifications_url":"https://api.github.com/repos/vcgomes/soletta/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vcgomes/soletta/labels{/name}","releases_url":"https://api.github.com/repos/vcgomes/soletta/releases{/id}","deployments_url":"https://api.github.com/repos/vcgomes/soletta/deployments","created_at":"2015-06-24T16:56:55Z","updated_at":"2015-06-24T16:56:57Z","pushed_at":"2016-03-30T20:32:05Z","git_url":"git://github.com/vcgomes/soletta.git","ssh_url":"git@github.com:vcgomes/soletta.git","clone_url":"https://github.com/vcgomes/soletta.git","svn_url":"https://github.com/vcgomes/soletta","homepage":"","size":17816,"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":"solettaproject:master","ref":"master","sha":"5daa00eadbe275dbb696a749f22fd319e39d877f","user":{"login":"solettaproject","id":12736897,"avatar_url":"https://avatars.githubusercontent.com/u/12736897?v=3","gravatar_id":"","url":"https://api.github.com/users/solettaproject","html_url":"https://github.com/solettaproject","followers_url":"https://api.github.com/users/solettaproject/followers","following_url":"https://api.github.com/users/solettaproject/following{/other_user}","gists_url":"https://api.github.com/users/solettaproject/gists{/gist_id}","starred_url":"https://api.github.com/users/solettaproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/solettaproject/subscriptions","organizations_url":"https://api.github.com/users/solettaproject/orgs","repos_url":"https://api.github.com/users/solettaproject/repos","events_url":"https://api.github.com/users/solettaproject/events{/privacy}","received_events_url":"https://api.github.com/users/solettaproject/received_events","type":"Organization","site_admin":false},"repo":{"id":37087063,"name":"soletta","full_name":"solettaproject/soletta","owner":{"login":"solettaproject","id":12736897,"avatar_url":"https://avatars.githubusercontent.com/u/12736897?v=3","gravatar_id":"","url":"https://api.github.com/users/solettaproject","html_url":"https://github.com/solettaproject","followers_url":"https://api.github.com/users/solettaproject/followers","following_url":"https://api.github.com/users/solettaproject/following{/other_user}","gists_url":"https://api.github.com/users/solettaproject/gists{/gist_id}","starred_url":"https://api.github.com/users/solettaproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/solettaproject/subscriptions","organizations_url":"https://api.github.com/users/solettaproject/orgs","repos_url":"https://api.github.com/users/solettaproject/repos","events_url":"https://api.github.com/users/solettaproject/events{/privacy}","received_events_url":"https://api.github.com/users/solettaproject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/solettaproject/soletta","description":"Soletta Project is a framework for making IoT devices.  With Soletta Project's libraries developers can easily write software for devices that control actuators/sensors and communicate using standard technologies. It enables adding smartness even on the smallest edge devices.  ","fork":false,"url":"https://api.github.com/repos/solettaproject/soletta","forks_url":"https://api.github.com/repos/solettaproject/soletta/forks","keys_url":"https://api.github.com/repos/solettaproject/soletta/keys{/key_id}","collaborators_url":"https://api.github.com/repos/solettaproject/soletta/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/solettaproject/soletta/teams","hooks_url":"https://api.github.com/repos/solettaproject/soletta/hooks","issue_events_url":"https://api.github.com/repos/solettaproject/soletta/issues/events{/number}","events_url":"https://api.github.com/repos/solettaproject/soletta/events","assignees_url":"https://api.github.com/repos/solettaproject/soletta/assignees{/user}","branches_url":"https://api.github.com/repos/solettaproject/soletta/branches{/branch}","tags_url":"https://api.github.com/repos/solettaproject/soletta/tags","blobs_url":"https://api.github.com/repos/solettaproject/soletta/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/solettaproject/soletta/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/solettaproject/soletta/git/refs{/sha}","trees_url":"https://api.github.com/repos/solettaproject/soletta/git/trees{/sha}","statuses_url":"https://api.github.com/repos/solettaproject/soletta/statuses/{sha}","languages_url":"https://api.github.com/repos/solettaproject/soletta/languages","stargazers_url":"https://api.github.com/repos/solettaproject/soletta/stargazers","contributors_url":"https://api.github.com/repos/solettaproject/soletta/contributors","subscribers_url":"https://api.github.com/repos/solettaproject/soletta/subscribers","subscription_url":"https://api.github.com/repos/solettaproject/soletta/subscription","commits_url":"https://api.github.com/repos/solettaproject/soletta/commits{/sha}","git_commits_url":"https://api.github.com/repos/solettaproject/soletta/git/commits{/sha}","comments_url":"https://api.github.com/repos/solettaproject/soletta/comments{/number}","issue_comment_url":"https://api.github.com/repos/solettaproject/soletta/issues/comments{/number}","contents_url":"https://api.github.com/repos/solettaproject/soletta/contents/{+path}","compare_url":"https://api.github.com/repos/solettaproject/soletta/compare/{base}...{head}","merges_url":"https://api.github.com/repos/solettaproject/soletta/merges","archive_url":"https://api.github.com/repos/solettaproject/soletta/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/solettaproject/soletta/downloads","issues_url":"https://api.github.com/repos/solettaproject/soletta/issues{/number}","pulls_url":"https://api.github.com/repos/solettaproject/soletta/pulls{/number}","milestones_url":"https://api.github.com/repos/solettaproject/soletta/milestones{/number}","notifications_url":"https://api.github.com/repos/solettaproject/soletta/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/solettaproject/soletta/labels{/name}","releases_url":"https://api.github.com/repos/solettaproject/soletta/releases{/id}","deployments_url":"https://api.github.com/repos/solettaproject/soletta/deployments","created_at":"2015-06-08T19:13:18Z","updated_at":"2016-03-28T01:06:55Z","pushed_at":"2016-03-30T22:01:34Z","git_url":"git://github.com/solettaproject/soletta.git","ssh_url":"git@github.com:solettaproject/soletta.git","clone_url":"https://github.com/solettaproject/soletta.git","svn_url":"https://github.com/solettaproject/soletta","homepage":"http://solettaproject.org","size":24640,"stargazers_count":79,"watchers_count":79,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":63,"mirror_url":null,"open_issues_count":194,"forks":63,"open_issues":194,"watchers":79,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/solettaproject/soletta/pulls/1764"},"html":{"href":"https://github.com/solettaproject/soletta/pull/1764"},"issue":{"href":"https://api.github.com/repos/solettaproject/soletta/issues/1764"},"comments":{"href":"https://api.github.com/repos/solettaproject/soletta/issues/1764/comments"},"review_comments":{"href":"https://api.github.com/repos/solettaproject/soletta/pulls/1764/comments"},"review_comment":{"href":"https://api.github.com/repos/solettaproject/soletta/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/solettaproject/soletta/pulls/1764/commits"},"statuses":{"href":"https://api.github.com/repos/solettaproject/soletta/statuses/ee35564a89d01b572f5bbfec5cfd3580df616706"}}}}