{"action":"created","comment":{"url":"https://api.github.com/repos/solettaproject/soletta/pulls/comments/67234026","id":67234026,"diff_hunk":"@@ -930,6 +1050,75 @@ static const struct sol_coap_resource registration_interface = {\n     }\n };\n \n+static int\n+bootstrap_request(void *data, struct sol_coap_server *coap,\n+    const struct sol_coap_resource *resource,\n+    struct sol_coap_packet *req,\n+    const struct sol_network_link_addr *cliaddr)\n+{\n+    struct sol_lwm2m_bootstrap_client_info *bs_cinfo;\n+    struct sol_lwm2m_bootstrap_server *server = data;\n+    struct sol_coap_packet *response;\n+    int r, i;\n+    bool know_client = false;\n+\n+    SOL_DBG(\"Client Bootstrap Request received\");\n+\n+    response = sol_coap_packet_new(req);\n+    SOL_NULL_CHECK(response, -ENOMEM);\n+\n+    r = new_bootstrap_client_info(&bs_cinfo, cliaddr);\n+    SOL_INT_CHECK_GOTO(r, < 0, err_exit);\n+\n+    r = fill_bootstrap_client_info(bs_cinfo, req);\n+    SOL_INT_CHECK_GOTO(r, < 0, err_exit_del_client);\n+\n+    // TODO: Should I keep clients like this for some reason?\n+/*\n+    r = sol_ptr_vector_append(&server->clients, cinfo);\n+    SOL_INT_CHECK_GOTO(r, < 0, err_exit_del_client);\n+ */\n+\n+    for (i = 0; server->known_clients[i]; i++) {\n+        if (strcmp(server->known_clients[i], bs_cinfo->name) == 0)","path":"src/lib/comms/sol-lwm2m.c","position":269,"original_position":243,"commit_id":"b8391025f4f76eeb30ad4fc7cc65755a0bcffd53","original_commit_id":"187a6d0e5ec32218a6926d723b69c6272a186af0","user":{"login":"bsmelo","id":15204241,"avatar_url":"https://avatars.githubusercontent.com/u/15204241?v=3","gravatar_id":"","url":"https://api.github.com/users/bsmelo","html_url":"https://github.com/bsmelo","followers_url":"https://api.github.com/users/bsmelo/followers","following_url":"https://api.github.com/users/bsmelo/following{/other_user}","gists_url":"https://api.github.com/users/bsmelo/gists{/gist_id}","starred_url":"https://api.github.com/users/bsmelo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bsmelo/subscriptions","organizations_url":"https://api.github.com/users/bsmelo/orgs","repos_url":"https://api.github.com/users/bsmelo/repos","events_url":"https://api.github.com/users/bsmelo/events{/privacy}","received_events_url":"https://api.github.com/users/bsmelo/received_events","type":"User","site_admin":false},"body":"Changed the type of `i`.\r\n\r\nRegarding the first comment, it should be enough to check if `known_clients` is `NULL` in `sol_lwm2m_bootstrap_server_new()`, right? `known_clients` is supposed to be `NULL`-terminated itself.","created_at":"2016-06-15T19:56:36Z","updated_at":"2016-06-15T19:56:36Z","html_url":"https://github.com/solettaproject/soletta/pull/2178#discussion_r67234026","pull_request_url":"https://api.github.com/repos/solettaproject/soletta/pulls/2178","_links":{"self":{"href":"https://api.github.com/repos/solettaproject/soletta/pulls/comments/67234026"},"html":{"href":"https://github.com/solettaproject/soletta/pull/2178#discussion_r67234026"},"pull_request":{"href":"https://api.github.com/repos/solettaproject/soletta/pulls/2178"}}},"pull_request":{"url":"https://api.github.com/repos/solettaproject/soletta/pulls/2178","id":73918033,"html_url":"https://github.com/solettaproject/soletta/pull/2178","diff_url":"https://github.com/solettaproject/soletta/pull/2178.diff","patch_url":"https://github.com/solettaproject/soletta/pull/2178.patch","issue_url":"https://api.github.com/repos/solettaproject/soletta/issues/2178","number":2178,"state":"open","locked":false,"title":"WIP: lwm2m: adding the Bootstrap Interface","user":{"login":"bsmelo","id":15204241,"avatar_url":"https://avatars.githubusercontent.com/u/15204241?v=3","gravatar_id":"","url":"https://api.github.com/users/bsmelo","html_url":"https://github.com/bsmelo","followers_url":"https://api.github.com/users/bsmelo/followers","following_url":"https://api.github.com/users/bsmelo/following{/other_user}","gists_url":"https://api.github.com/users/bsmelo/gists{/gist_id}","starred_url":"https://api.github.com/users/bsmelo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bsmelo/subscriptions","organizations_url":"https://api.github.com/users/bsmelo/orgs","repos_url":"https://api.github.com/users/bsmelo/repos","events_url":"https://api.github.com/users/bsmelo/events{/privacy}","received_events_url":"https://api.github.com/users/bsmelo/received_events","type":"User","site_admin":false},"body":"This patch introduces:\r\n\r\n- Bootstrap Interface Operations\r\n - Request (client -> bs-server)\r\n - Delete (bs-server -> client)\r\n - Write (bs-server -> client)\r\n - Finish (bs-server -> client)\r\n- A LWM2M Bootstrap Server sample app\r\n- Modifications in the LWM2M Client app to receive an argument indicating if it should behave as a factory-bootstrapped device or not\r\n\r\nThere is a _\"cry for help comment\"_ in the last commit of this branch, for which I would like some help, mainly to solve the `TODO`s currently in the code - as well as some issues pointed out by `valgrind`, described in the commit comment itself.\r\n\r\n_**Edit:** Oh wow, I didn't know the comment from the commit would appear here. Well, I'll just leave it there. Let me know if it's best to get rid of it and send by e-mail or something._\r\n\r\nSigned-off-by: Bruno Melo <bsilva.melo@gmail.com>","created_at":"2016-06-15T14:08:24Z","updated_at":"2016-06-15T19:56:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4931fae4407e0091966aa5b5911a4d2cf5955285","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/solettaproject/soletta/pulls/2178/commits","review_comments_url":"https://api.github.com/repos/solettaproject/soletta/pulls/2178/comments","review_comment_url":"https://api.github.com/repos/solettaproject/soletta/pulls/comments{/number}","comments_url":"https://api.github.com/repos/solettaproject/soletta/issues/2178/comments","statuses_url":"https://api.github.com/repos/solettaproject/soletta/statuses/b8391025f4f76eeb30ad4fc7cc65755a0bcffd53","head":{"label":"bsmelo:lwm2m-bootstrap-v1","ref":"lwm2m-bootstrap-v1","sha":"b8391025f4f76eeb30ad4fc7cc65755a0bcffd53","user":{"login":"bsmelo","id":15204241,"avatar_url":"https://avatars.githubusercontent.com/u/15204241?v=3","gravatar_id":"","url":"https://api.github.com/users/bsmelo","html_url":"https://github.com/bsmelo","followers_url":"https://api.github.com/users/bsmelo/followers","following_url":"https://api.github.com/users/bsmelo/following{/other_user}","gists_url":"https://api.github.com/users/bsmelo/gists{/gist_id}","starred_url":"https://api.github.com/users/bsmelo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bsmelo/subscriptions","organizations_url":"https://api.github.com/users/bsmelo/orgs","repos_url":"https://api.github.com/users/bsmelo/repos","events_url":"https://api.github.com/users/bsmelo/events{/privacy}","received_events_url":"https://api.github.com/users/bsmelo/received_events","type":"User","site_admin":false},"repo":{"id":54440906,"name":"soletta","full_name":"bsmelo/soletta","owner":{"login":"bsmelo","id":15204241,"avatar_url":"https://avatars.githubusercontent.com/u/15204241?v=3","gravatar_id":"","url":"https://api.github.com/users/bsmelo","html_url":"https://github.com/bsmelo","followers_url":"https://api.github.com/users/bsmelo/followers","following_url":"https://api.github.com/users/bsmelo/following{/other_user}","gists_url":"https://api.github.com/users/bsmelo/gists{/gist_id}","starred_url":"https://api.github.com/users/bsmelo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bsmelo/subscriptions","organizations_url":"https://api.github.com/users/bsmelo/orgs","repos_url":"https://api.github.com/users/bsmelo/repos","events_url":"https://api.github.com/users/bsmelo/events{/privacy}","received_events_url":"https://api.github.com/users/bsmelo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bsmelo/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/bsmelo/soletta","forks_url":"https://api.github.com/repos/bsmelo/soletta/forks","keys_url":"https://api.github.com/repos/bsmelo/soletta/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bsmelo/soletta/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bsmelo/soletta/teams","hooks_url":"https://api.github.com/repos/bsmelo/soletta/hooks","issue_events_url":"https://api.github.com/repos/bsmelo/soletta/issues/events{/number}","events_url":"https://api.github.com/repos/bsmelo/soletta/events","assignees_url":"https://api.github.com/repos/bsmelo/soletta/assignees{/user}","branches_url":"https://api.github.com/repos/bsmelo/soletta/branches{/branch}","tags_url":"https://api.github.com/repos/bsmelo/soletta/tags","blobs_url":"https://api.github.com/repos/bsmelo/soletta/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bsmelo/soletta/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bsmelo/soletta/git/refs{/sha}","trees_url":"https://api.github.com/repos/bsmelo/soletta/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bsmelo/soletta/statuses/{sha}","languages_url":"https://api.github.com/repos/bsmelo/soletta/languages","stargazers_url":"https://api.github.com/repos/bsmelo/soletta/stargazers","contributors_url":"https://api.github.com/repos/bsmelo/soletta/contributors","subscribers_url":"https://api.github.com/repos/bsmelo/soletta/subscribers","subscription_url":"https://api.github.com/repos/bsmelo/soletta/subscription","commits_url":"https://api.github.com/repos/bsmelo/soletta/commits{/sha}","git_commits_url":"https://api.github.com/repos/bsmelo/soletta/git/commits{/sha}","comments_url":"https://api.github.com/repos/bsmelo/soletta/comments{/number}","issue_comment_url":"https://api.github.com/repos/bsmelo/soletta/issues/comments{/number}","contents_url":"https://api.github.com/repos/bsmelo/soletta/contents/{+path}","compare_url":"https://api.github.com/repos/bsmelo/soletta/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bsmelo/soletta/merges","archive_url":"https://api.github.com/repos/bsmelo/soletta/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bsmelo/soletta/downloads","issues_url":"https://api.github.com/repos/bsmelo/soletta/issues{/number}","pulls_url":"https://api.github.com/repos/bsmelo/soletta/pulls{/number}","milestones_url":"https://api.github.com/repos/bsmelo/soletta/milestones{/number}","notifications_url":"https://api.github.com/repos/bsmelo/soletta/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bsmelo/soletta/labels{/name}","releases_url":"https://api.github.com/repos/bsmelo/soletta/releases{/id}","deployments_url":"https://api.github.com/repos/bsmelo/soletta/deployments","created_at":"2016-03-22T03:04:07Z","updated_at":"2016-03-22T03:04:11Z","pushed_at":"2016-06-15T13:41:57Z","git_url":"git://github.com/bsmelo/soletta.git","ssh_url":"git@github.com:bsmelo/soletta.git","clone_url":"https://github.com/bsmelo/soletta.git","svn_url":"https://github.com/bsmelo/soletta","homepage":"http://solettaproject.org","size":20702,"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":"c61dcca0eb0bd8eeeba4588cfdb120060cddfbfb","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-06-12T06:01:11Z","pushed_at":"2016-06-15T16:20:38Z","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":29525,"stargazers_count":103,"watchers_count":103,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":86,"mirror_url":null,"open_issues_count":130,"forks":86,"open_issues":130,"watchers":103,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/solettaproject/soletta/pulls/2178"},"html":{"href":"https://github.com/solettaproject/soletta/pull/2178"},"issue":{"href":"https://api.github.com/repos/solettaproject/soletta/issues/2178"},"comments":{"href":"https://api.github.com/repos/solettaproject/soletta/issues/2178/comments"},"review_comments":{"href":"https://api.github.com/repos/solettaproject/soletta/pulls/2178/comments"},"review_comment":{"href":"https://api.github.com/repos/solettaproject/soletta/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/solettaproject/soletta/pulls/2178/commits"},"statuses":{"href":"https://api.github.com/repos/solettaproject/soletta/statuses/b8391025f4f76eeb30ad4fc7cc65755a0bcffd53"}}}}
{"actor":{"display_login":"bsmelo"}}