{"action":"created","comment":{"url":"https://api.github.com/repos/OpenLightingProject/ja-rule/pulls/comments/34848163","id":34848163,"diff_hunk":"@@ -0,0 +1,78 @@\n+/*\n+ * This library is free software; you can redistribute it and/or\n+ * modify it under the terms of the GNU Lesser General Public\n+ * License as published by the Free Software Foundation; either\n+ * version 2.1 of the License, or (at your option) any later version.\n+ *\n+ * This library is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+ * Lesser General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Lesser General Public\n+ * License along with this library; if not, write to the Free Software\n+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n+ *\n+ * rdm_util.c\n+ * Copyright (C) 2015 Simon Newton\n+ */\n+#include \"rdm_util.h\"\n+\n+#ifdef HAVE_ARPA_INET_H\n+#include <arpa/inet.h>\n+#endif\n+\n+#include \"system_pipeline.h\"\n+#include \"constants.h\"\n+#include \"utils.h\"\n+\n+bool RDMUtil_RequiresAction(const RDMResponder *responder,\n+                            const uint8_t uid[UID_LENGTH]) {\n+  if (RDMUtil_UIDCompare(responder->uid, uid) == 0) {\n+    return true;\n+  }\n+\n+  if (uid[2] != 0xff || uid[3] != 0xff || uid[4] != 0xff || uid[5] != 0xff) {","path":"firmware/src/rdm_util.c","position":35,"original_position":35,"commit_id":"9e3d47a73279a60f2806df730b8e2f7e72329d28","original_commit_id":"9e3d47a73279a60f2806df730b8e2f7e72329d28","user":{"login":"peternewman","id":6216436,"avatar_url":"https://avatars.githubusercontent.com/u/6216436?v=3","gravatar_id":"","url":"https://api.github.com/users/peternewman","html_url":"https://github.com/peternewman","followers_url":"https://api.github.com/users/peternewman/followers","following_url":"https://api.github.com/users/peternewman/following{/other_user}","gists_url":"https://api.github.com/users/peternewman/gists{/gist_id}","starred_url":"https://api.github.com/users/peternewman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peternewman/subscriptions","organizations_url":"https://api.github.com/users/peternewman/orgs","repos_url":"https://api.github.com/users/peternewman/repos","events_url":"https://api.github.com/users/peternewman/events{/privacy}","received_events_url":"https://api.github.com/users/peternewman/received_events","type":"User","site_admin":false},"body":"Didn't we have this code already, or has it been refactored?","created_at":"2015-07-16T23:07:13Z","updated_at":"2015-07-16T23:07:13Z","html_url":"https://github.com/OpenLightingProject/ja-rule/pull/74#discussion_r34848163","pull_request_url":"https://api.github.com/repos/OpenLightingProject/ja-rule/pulls/74","_links":{"self":{"href":"https://api.github.com/repos/OpenLightingProject/ja-rule/pulls/comments/34848163"},"html":{"href":"https://github.com/OpenLightingProject/ja-rule/pull/74#discussion_r34848163"},"pull_request":{"href":"https://api.github.com/repos/OpenLightingProject/ja-rule/pulls/74"}}},"pull_request":{"url":"https://api.github.com/repos/OpenLightingProject/ja-rule/pulls/74","id":40155361,"html_url":"https://github.com/OpenLightingProject/ja-rule/pull/74","diff_url":"https://github.com/OpenLightingProject/ja-rule/pull/74.diff","patch_url":"https://github.com/OpenLightingProject/ja-rule/pull/74.patch","issue_url":"https://api.github.com/repos/OpenLightingProject/ja-rule/issues/74","number":74,"state":"open","locked":false,"title":"Add the rdm_util code & tests.","user":{"login":"nomis52","id":4355332,"avatar_url":"https://avatars.githubusercontent.com/u/4355332?v=3","gravatar_id":"","url":"https://api.github.com/users/nomis52","html_url":"https://github.com/nomis52","followers_url":"https://api.github.com/users/nomis52/followers","following_url":"https://api.github.com/users/nomis52/following{/other_user}","gists_url":"https://api.github.com/users/nomis52/gists{/gist_id}","starred_url":"https://api.github.com/users/nomis52/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nomis52/subscriptions","organizations_url":"https://api.github.com/users/nomis52/orgs","repos_url":"https://api.github.com/users/nomis52/repos","events_url":"https://api.github.com/users/nomis52/events{/privacy}","received_events_url":"https://api.github.com/users/nomis52/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-07-16T17:38:45Z","updated_at":"2015-07-16T23:07:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a1a0d078cd50864921b4ad9f606fe6ec7c604991","assignee":{"login":"peternewman","id":6216436,"avatar_url":"https://avatars.githubusercontent.com/u/6216436?v=3","gravatar_id":"","url":"https://api.github.com/users/peternewman","html_url":"https://github.com/peternewman","followers_url":"https://api.github.com/users/peternewman/followers","following_url":"https://api.github.com/users/peternewman/following{/other_user}","gists_url":"https://api.github.com/users/peternewman/gists{/gist_id}","starred_url":"https://api.github.com/users/peternewman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peternewman/subscriptions","organizations_url":"https://api.github.com/users/peternewman/orgs","repos_url":"https://api.github.com/users/peternewman/repos","events_url":"https://api.github.com/users/peternewman/events{/privacy}","received_events_url":"https://api.github.com/users/peternewman/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/OpenLightingProject/ja-rule/pulls/74/commits","review_comments_url":"https://api.github.com/repos/OpenLightingProject/ja-rule/pulls/74/comments","review_comment_url":"https://api.github.com/repos/OpenLightingProject/ja-rule/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OpenLightingProject/ja-rule/issues/74/comments","statuses_url":"https://api.github.com/repos/OpenLightingProject/ja-rule/statuses/9e3d47a73279a60f2806df730b8e2f7e72329d28","head":{"label":"nomis52:rdm","ref":"rdm","sha":"9e3d47a73279a60f2806df730b8e2f7e72329d28","user":{"login":"nomis52","id":4355332,"avatar_url":"https://avatars.githubusercontent.com/u/4355332?v=3","gravatar_id":"","url":"https://api.github.com/users/nomis52","html_url":"https://github.com/nomis52","followers_url":"https://api.github.com/users/nomis52/followers","following_url":"https://api.github.com/users/nomis52/following{/other_user}","gists_url":"https://api.github.com/users/nomis52/gists{/gist_id}","starred_url":"https://api.github.com/users/nomis52/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nomis52/subscriptions","organizations_url":"https://api.github.com/users/nomis52/orgs","repos_url":"https://api.github.com/users/nomis52/repos","events_url":"https://api.github.com/users/nomis52/events{/privacy}","received_events_url":"https://api.github.com/users/nomis52/received_events","type":"User","site_admin":false},"repo":{"id":29171822,"name":"ja-rule","full_name":"nomis52/ja-rule","owner":{"login":"nomis52","id":4355332,"avatar_url":"https://avatars.githubusercontent.com/u/4355332?v=3","gravatar_id":"","url":"https://api.github.com/users/nomis52","html_url":"https://github.com/nomis52","followers_url":"https://api.github.com/users/nomis52/followers","following_url":"https://api.github.com/users/nomis52/following{/other_user}","gists_url":"https://api.github.com/users/nomis52/gists{/gist_id}","starred_url":"https://api.github.com/users/nomis52/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nomis52/subscriptions","organizations_url":"https://api.github.com/users/nomis52/orgs","repos_url":"https://api.github.com/users/nomis52/repos","events_url":"https://api.github.com/users/nomis52/events{/privacy}","received_events_url":"https://api.github.com/users/nomis52/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nomis52/ja-rule","description":"Ja Rule","fork":true,"url":"https://api.github.com/repos/nomis52/ja-rule","forks_url":"https://api.github.com/repos/nomis52/ja-rule/forks","keys_url":"https://api.github.com/repos/nomis52/ja-rule/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nomis52/ja-rule/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nomis52/ja-rule/teams","hooks_url":"https://api.github.com/repos/nomis52/ja-rule/hooks","issue_events_url":"https://api.github.com/repos/nomis52/ja-rule/issues/events{/number}","events_url":"https://api.github.com/repos/nomis52/ja-rule/events","assignees_url":"https://api.github.com/repos/nomis52/ja-rule/assignees{/user}","branches_url":"https://api.github.com/repos/nomis52/ja-rule/branches{/branch}","tags_url":"https://api.github.com/repos/nomis52/ja-rule/tags","blobs_url":"https://api.github.com/repos/nomis52/ja-rule/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nomis52/ja-rule/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nomis52/ja-rule/git/refs{/sha}","trees_url":"https://api.github.com/repos/nomis52/ja-rule/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nomis52/ja-rule/statuses/{sha}","languages_url":"https://api.github.com/repos/nomis52/ja-rule/languages","stargazers_url":"https://api.github.com/repos/nomis52/ja-rule/stargazers","contributors_url":"https://api.github.com/repos/nomis52/ja-rule/contributors","subscribers_url":"https://api.github.com/repos/nomis52/ja-rule/subscribers","subscription_url":"https://api.github.com/repos/nomis52/ja-rule/subscription","commits_url":"https://api.github.com/repos/nomis52/ja-rule/commits{/sha}","git_commits_url":"https://api.github.com/repos/nomis52/ja-rule/git/commits{/sha}","comments_url":"https://api.github.com/repos/nomis52/ja-rule/comments{/number}","issue_comment_url":"https://api.github.com/repos/nomis52/ja-rule/issues/comments{/number}","contents_url":"https://api.github.com/repos/nomis52/ja-rule/contents/{+path}","compare_url":"https://api.github.com/repos/nomis52/ja-rule/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nomis52/ja-rule/merges","archive_url":"https://api.github.com/repos/nomis52/ja-rule/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nomis52/ja-rule/downloads","issues_url":"https://api.github.com/repos/nomis52/ja-rule/issues{/number}","pulls_url":"https://api.github.com/repos/nomis52/ja-rule/pulls{/number}","milestones_url":"https://api.github.com/repos/nomis52/ja-rule/milestones{/number}","notifications_url":"https://api.github.com/repos/nomis52/ja-rule/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nomis52/ja-rule/labels{/name}","releases_url":"https://api.github.com/repos/nomis52/ja-rule/releases{/id}","created_at":"2015-01-13T03:58:08Z","updated_at":"2015-04-19T22:29:48Z","pushed_at":"2015-07-16T17:42:17Z","git_url":"git://github.com/nomis52/ja-rule.git","ssh_url":"git@github.com:nomis52/ja-rule.git","clone_url":"https://github.com/nomis52/ja-rule.git","svn_url":"https://github.com/nomis52/ja-rule","homepage":null,"size":1480,"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":"OpenLightingProject:master","ref":"master","sha":"dad472370324d487d0275dedc1eb53ce696b4c4c","user":{"login":"OpenLightingProject","id":6199314,"avatar_url":"https://avatars.githubusercontent.com/u/6199314?v=3","gravatar_id":"","url":"https://api.github.com/users/OpenLightingProject","html_url":"https://github.com/OpenLightingProject","followers_url":"https://api.github.com/users/OpenLightingProject/followers","following_url":"https://api.github.com/users/OpenLightingProject/following{/other_user}","gists_url":"https://api.github.com/users/OpenLightingProject/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenLightingProject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenLightingProject/subscriptions","organizations_url":"https://api.github.com/users/OpenLightingProject/orgs","repos_url":"https://api.github.com/users/OpenLightingProject/repos","events_url":"https://api.github.com/users/OpenLightingProject/events{/privacy}","received_events_url":"https://api.github.com/users/OpenLightingProject/received_events","type":"Organization","site_admin":false},"repo":{"id":27968183,"name":"ja-rule","full_name":"OpenLightingProject/ja-rule","owner":{"login":"OpenLightingProject","id":6199314,"avatar_url":"https://avatars.githubusercontent.com/u/6199314?v=3","gravatar_id":"","url":"https://api.github.com/users/OpenLightingProject","html_url":"https://github.com/OpenLightingProject","followers_url":"https://api.github.com/users/OpenLightingProject/followers","following_url":"https://api.github.com/users/OpenLightingProject/following{/other_user}","gists_url":"https://api.github.com/users/OpenLightingProject/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenLightingProject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenLightingProject/subscriptions","organizations_url":"https://api.github.com/users/OpenLightingProject/orgs","repos_url":"https://api.github.com/users/OpenLightingProject/repos","events_url":"https://api.github.com/users/OpenLightingProject/events{/privacy}","received_events_url":"https://api.github.com/users/OpenLightingProject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OpenLightingProject/ja-rule","description":"Ja Rule","fork":false,"url":"https://api.github.com/repos/OpenLightingProject/ja-rule","forks_url":"https://api.github.com/repos/OpenLightingProject/ja-rule/forks","keys_url":"https://api.github.com/repos/OpenLightingProject/ja-rule/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OpenLightingProject/ja-rule/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OpenLightingProject/ja-rule/teams","hooks_url":"https://api.github.com/repos/OpenLightingProject/ja-rule/hooks","issue_events_url":"https://api.github.com/repos/OpenLightingProject/ja-rule/issues/events{/number}","events_url":"https://api.github.com/repos/OpenLightingProject/ja-rule/events","assignees_url":"https://api.github.com/repos/OpenLightingProject/ja-rule/assignees{/user}","branches_url":"https://api.github.com/repos/OpenLightingProject/ja-rule/branches{/branch}","tags_url":"https://api.github.com/repos/OpenLightingProject/ja-rule/tags","blobs_url":"https://api.github.com/repos/OpenLightingProject/ja-rule/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OpenLightingProject/ja-rule/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OpenLightingProject/ja-rule/git/refs{/sha}","trees_url":"https://api.github.com/repos/OpenLightingProject/ja-rule/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OpenLightingProject/ja-rule/statuses/{sha}","languages_url":"https://api.github.com/repos/OpenLightingProject/ja-rule/languages","stargazers_url":"https://api.github.com/repos/OpenLightingProject/ja-rule/stargazers","contributors_url":"https://api.github.com/repos/OpenLightingProject/ja-rule/contributors","subscribers_url":"https://api.github.com/repos/OpenLightingProject/ja-rule/subscribers","subscription_url":"https://api.github.com/repos/OpenLightingProject/ja-rule/subscription","commits_url":"https://api.github.com/repos/OpenLightingProject/ja-rule/commits{/sha}","git_commits_url":"https://api.github.com/repos/OpenLightingProject/ja-rule/git/commits{/sha}","comments_url":"https://api.github.com/repos/OpenLightingProject/ja-rule/comments{/number}","issue_comment_url":"https://api.github.com/repos/OpenLightingProject/ja-rule/issues/comments{/number}","contents_url":"https://api.github.com/repos/OpenLightingProject/ja-rule/contents/{+path}","compare_url":"https://api.github.com/repos/OpenLightingProject/ja-rule/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OpenLightingProject/ja-rule/merges","archive_url":"https://api.github.com/repos/OpenLightingProject/ja-rule/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OpenLightingProject/ja-rule/downloads","issues_url":"https://api.github.com/repos/OpenLightingProject/ja-rule/issues{/number}","pulls_url":"https://api.github.com/repos/OpenLightingProject/ja-rule/pulls{/number}","milestones_url":"https://api.github.com/repos/OpenLightingProject/ja-rule/milestones{/number}","notifications_url":"https://api.github.com/repos/OpenLightingProject/ja-rule/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OpenLightingProject/ja-rule/labels{/name}","releases_url":"https://api.github.com/repos/OpenLightingProject/ja-rule/releases{/id}","created_at":"2014-12-13T17:36:05Z","updated_at":"2015-04-19T22:43:43Z","pushed_at":"2015-07-16T17:42:18Z","git_url":"git://github.com/OpenLightingProject/ja-rule.git","ssh_url":"git@github.com:OpenLightingProject/ja-rule.git","clone_url":"https://github.com/OpenLightingProject/ja-rule.git","svn_url":"https://github.com/OpenLightingProject/ja-rule","homepage":null,"size":1759,"stargazers_count":1,"watchers_count":1,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":5,"forks":5,"open_issues":5,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/OpenLightingProject/ja-rule/pulls/74"},"html":{"href":"https://github.com/OpenLightingProject/ja-rule/pull/74"},"issue":{"href":"https://api.github.com/repos/OpenLightingProject/ja-rule/issues/74"},"comments":{"href":"https://api.github.com/repos/OpenLightingProject/ja-rule/issues/74/comments"},"review_comments":{"href":"https://api.github.com/repos/OpenLightingProject/ja-rule/pulls/74/comments"},"review_comment":{"href":"https://api.github.com/repos/OpenLightingProject/ja-rule/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OpenLightingProject/ja-rule/pulls/74/commits"},"statuses":{"href":"https://api.github.com/repos/OpenLightingProject/ja-rule/statuses/9e3d47a73279a60f2806df730b8e2f7e72329d28"}}}}