{"action":"created","comment":{"url":"https://api.github.com/repos/solettaproject/soletta/pulls/comments/59276325","id":59276325,"diff_hunk":"@@ -437,85 +351,104 @@ sol_socket_linux_bind(struct sol_socket *socket, const struct sol_network_link_a\n }\n \n static int\n-sol_socket_option_to_linux(enum sol_socket_option option)\n+sol_socket_linux_set_read_monitor(struct sol_socket *s, bool on)\n {\n-    switch (option) {\n-    case SOL_SOCKET_OPTION_REUSEADDR:\n-        return SO_REUSEADDR;\n-    case SOL_SOCKET_OPTION_REUSEPORT:\n-        return SO_REUSEPORT;\n-    default:\n-        SOL_WRN(\"Invalid option %d\", option);\n-        break;\n-    }\n+    bool ret;\n+    struct sol_socket_linux *sock = (struct sol_socket_linux *)s;\n \n-    return -1;\n-}\n+    SOL_NULL_CHECK(sock->on_can_read, -EINVAL);\n \n-static int\n-sol_socket_level_to_linux(enum sol_socket_level level)\n-{\n-    switch (level) {\n-    case SOL_SOCKET_LEVEL_SOCKET:\n-        return SOL_SOCKET;\n-    case SOL_SOCKET_LEVEL_IP:\n-        return IPPROTO_IP;\n-    case SOL_SOCKET_LEVEL_IPV6:\n-        return IPPROTO_IPV6;\n-    default:\n-        SOL_WRN(\"Invalid level %d\", level);\n-        break;\n+    if (!sock) {","path":"src/lib/comms/sol-socket-impl-linux.c","position":269,"original_position":269,"commit_id":"23daabf68904d4366c2f173962c075511c992860","original_commit_id":"06545fe0ba08e801e2e5c2c9c04ee97069d2708e","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":"Ah, I guess you meant `sock->watch`, no?\r\n\r\n(my other comment missed that)\r\n","created_at":"2016-04-11T20:34:58Z","updated_at":"2016-04-11T20:34:58Z","html_url":"https://github.com/solettaproject/soletta/pull/1859#discussion_r59276325","pull_request_url":"https://api.github.com/repos/solettaproject/soletta/pulls/1859","_links":{"self":{"href":"https://api.github.com/repos/solettaproject/soletta/pulls/comments/59276325"},"html":{"href":"https://github.com/solettaproject/soletta/pull/1859#discussion_r59276325"},"pull_request":{"href":"https://api.github.com/repos/solettaproject/soletta/pulls/1859"}}},"pull_request":{"url":"https://api.github.com/repos/solettaproject/soletta/pulls/1859","id":66051821,"html_url":"https://github.com/solettaproject/soletta/pull/1859","diff_url":"https://github.com/solettaproject/soletta/pull/1859.diff","patch_url":"https://github.com/solettaproject/soletta/pull/1859.patch","issue_url":"https://api.github.com/repos/solettaproject/soletta/issues/1859","number":1859,"state":"open","locked":false,"title":"Socket v3","user":{"login":"ceolin","id":882919,"avatar_url":"https://avatars.githubusercontent.com/u/882919?v=3","gravatar_id":"","url":"https://api.github.com/users/ceolin","html_url":"https://github.com/ceolin","followers_url":"https://api.github.com/users/ceolin/followers","following_url":"https://api.github.com/users/ceolin/following{/other_user}","gists_url":"https://api.github.com/users/ceolin/gists{/gist_id}","starred_url":"https://api.github.com/users/ceolin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ceolin/subscriptions","organizations_url":"https://api.github.com/users/ceolin/orgs","repos_url":"https://api.github.com/users/ceolin/repos","events_url":"https://api.github.com/users/ceolin/events{/privacy}","received_events_url":"https://api.github.com/users/ceolin/received_events","type":"User","site_admin":false},"body":"from v2:\r\n\r\n- Change options's name\r\n- Use sub api in options\r\n- Do not create the fd watch if this is not used\r\n- Fixes on doc\r\n- sendmsg() returns ssize_t\r\n- added client/server echo sample","created_at":"2016-04-11T19:52:56Z","updated_at":"2016-04-11T20:34:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4cf64609e9df5bc7ac7d897bddde4d067ef2c62a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/solettaproject/soletta/pulls/1859/commits","review_comments_url":"https://api.github.com/repos/solettaproject/soletta/pulls/1859/comments","review_comment_url":"https://api.github.com/repos/solettaproject/soletta/pulls/comments{/number}","comments_url":"https://api.github.com/repos/solettaproject/soletta/issues/1859/comments","statuses_url":"https://api.github.com/repos/solettaproject/soletta/statuses/23daabf68904d4366c2f173962c075511c992860","head":{"label":"ceolin:socket-v3","ref":"socket-v3","sha":"23daabf68904d4366c2f173962c075511c992860","user":{"login":"ceolin","id":882919,"avatar_url":"https://avatars.githubusercontent.com/u/882919?v=3","gravatar_id":"","url":"https://api.github.com/users/ceolin","html_url":"https://github.com/ceolin","followers_url":"https://api.github.com/users/ceolin/followers","following_url":"https://api.github.com/users/ceolin/following{/other_user}","gists_url":"https://api.github.com/users/ceolin/gists{/gist_id}","starred_url":"https://api.github.com/users/ceolin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ceolin/subscriptions","organizations_url":"https://api.github.com/users/ceolin/orgs","repos_url":"https://api.github.com/users/ceolin/repos","events_url":"https://api.github.com/users/ceolin/events{/privacy}","received_events_url":"https://api.github.com/users/ceolin/received_events","type":"User","site_admin":false},"repo":{"id":37607073,"name":"soletta","full_name":"ceolin/soletta","owner":{"login":"ceolin","id":882919,"avatar_url":"https://avatars.githubusercontent.com/u/882919?v=3","gravatar_id":"","url":"https://api.github.com/users/ceolin","html_url":"https://github.com/ceolin","followers_url":"https://api.github.com/users/ceolin/followers","following_url":"https://api.github.com/users/ceolin/following{/other_user}","gists_url":"https://api.github.com/users/ceolin/gists{/gist_id}","starred_url":"https://api.github.com/users/ceolin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ceolin/subscriptions","organizations_url":"https://api.github.com/users/ceolin/orgs","repos_url":"https://api.github.com/users/ceolin/repos","events_url":"https://api.github.com/users/ceolin/events{/privacy}","received_events_url":"https://api.github.com/users/ceolin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ceolin/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.  Portable and scalable, it abstracts details of hardware and OS, enabling developers to reuse their code and knowledge on different targets.","fork":true,"url":"https://api.github.com/repos/ceolin/soletta","forks_url":"https://api.github.com/repos/ceolin/soletta/forks","keys_url":"https://api.github.com/repos/ceolin/soletta/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ceolin/soletta/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ceolin/soletta/teams","hooks_url":"https://api.github.com/repos/ceolin/soletta/hooks","issue_events_url":"https://api.github.com/repos/ceolin/soletta/issues/events{/number}","events_url":"https://api.github.com/repos/ceolin/soletta/events","assignees_url":"https://api.github.com/repos/ceolin/soletta/assignees{/user}","branches_url":"https://api.github.com/repos/ceolin/soletta/branches{/branch}","tags_url":"https://api.github.com/repos/ceolin/soletta/tags","blobs_url":"https://api.github.com/repos/ceolin/soletta/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ceolin/soletta/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ceolin/soletta/git/refs{/sha}","trees_url":"https://api.github.com/repos/ceolin/soletta/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ceolin/soletta/statuses/{sha}","languages_url":"https://api.github.com/repos/ceolin/soletta/languages","stargazers_url":"https://api.github.com/repos/ceolin/soletta/stargazers","contributors_url":"https://api.github.com/repos/ceolin/soletta/contributors","subscribers_url":"https://api.github.com/repos/ceolin/soletta/subscribers","subscription_url":"https://api.github.com/repos/ceolin/soletta/subscription","commits_url":"https://api.github.com/repos/ceolin/soletta/commits{/sha}","git_commits_url":"https://api.github.com/repos/ceolin/soletta/git/commits{/sha}","comments_url":"https://api.github.com/repos/ceolin/soletta/comments{/number}","issue_comment_url":"https://api.github.com/repos/ceolin/soletta/issues/comments{/number}","contents_url":"https://api.github.com/repos/ceolin/soletta/contents/{+path}","compare_url":"https://api.github.com/repos/ceolin/soletta/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ceolin/soletta/merges","archive_url":"https://api.github.com/repos/ceolin/soletta/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ceolin/soletta/downloads","issues_url":"https://api.github.com/repos/ceolin/soletta/issues{/number}","pulls_url":"https://api.github.com/repos/ceolin/soletta/pulls{/number}","milestones_url":"https://api.github.com/repos/ceolin/soletta/milestones{/number}","notifications_url":"https://api.github.com/repos/ceolin/soletta/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ceolin/soletta/labels{/name}","releases_url":"https://api.github.com/repos/ceolin/soletta/releases{/id}","deployments_url":"https://api.github.com/repos/ceolin/soletta/deployments","created_at":"2015-06-17T16:33:08Z","updated_at":"2015-06-17T16:33:10Z","pushed_at":"2016-04-11T19:45:53Z","git_url":"git://github.com/ceolin/soletta.git","ssh_url":"git@github.com:ceolin/soletta.git","clone_url":"https://github.com/ceolin/soletta.git","svn_url":"https://github.com/ceolin/soletta","homepage":"","size":18190,"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":"20e3abd28a157f7d9bd93a44a919252b737680d2","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-04-10T01:09:40Z","pushed_at":"2016-04-11T19:54:05Z","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":25230,"stargazers_count":84,"watchers_count":84,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":68,"mirror_url":null,"open_issues_count":190,"forks":68,"open_issues":190,"watchers":84,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/solettaproject/soletta/pulls/1859"},"html":{"href":"https://github.com/solettaproject/soletta/pull/1859"},"issue":{"href":"https://api.github.com/repos/solettaproject/soletta/issues/1859"},"comments":{"href":"https://api.github.com/repos/solettaproject/soletta/issues/1859/comments"},"review_comments":{"href":"https://api.github.com/repos/solettaproject/soletta/pulls/1859/comments"},"review_comment":{"href":"https://api.github.com/repos/solettaproject/soletta/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/solettaproject/soletta/pulls/1859/commits"},"statuses":{"href":"https://api.github.com/repos/solettaproject/soletta/statuses/23daabf68904d4366c2f173962c075511c992860"}}}}