{"action":"created","comment":{"url":"https://api.github.com/repos/ElektraInitiative/libelektra/pulls/comments/82531805","pull_request_review_id":3433546,"id":82531805,"diff_hunk":"@@ -83,6 +82,47 @@ static int validateKey (Key * key)\n \treturn 0;\n }\n \n+static int validateWithArray (Key * key)\n+{\n+\tconst Key * multiEnum = keyGetMeta (key, \"check/enum/multi\");\n+\tchar * localString = strdup (keyString (key));\n+\tKeySet * validValues = elektraMetaArrayToKS (key, \"check/enum\");\n+\tchar * value = strtok (localString, \" \");\n+\tshort isValid;\n+\twhile (value)\n+\t{\n+\t\tKey * cur;\n+\t\tisValid = 0;\n+\t\twhile ((cur = ksNext (validValues)) != NULL)\n+\t\t{\n+\t\t\tif (!strcmp (value, keyString (cur)))\n+\t\t\t{\n+\t\t\t\tisValid = 1;\n+\t\t\t\tbreak;\n+\t\t\t}\n+\t\t}\n+\t\tif (!isValid)\n+\t\t{\n+\t\t\tbreak;\n+\t\t}\n+\t\tvalue = strtok (NULL, \" \");\n+\t}\n+\tfree (localString);","path":"src/plugins/enum/enum.c","position":51,"original_position":51,"commit_id":"b4b08811f1795c2830f04597960b96102b49022d","original_commit_id":"b4b08811f1795c2830f04597960b96102b49022d","user":{"login":"markus2330","id":7949075,"avatar_url":"https://avatars.githubusercontent.com/u/7949075?v=3","gravatar_id":"","url":"https://api.github.com/users/markus2330","html_url":"https://github.com/markus2330","followers_url":"https://api.github.com/users/markus2330/followers","following_url":"https://api.github.com/users/markus2330/following{/other_user}","gists_url":"https://api.github.com/users/markus2330/gists{/gist_id}","starred_url":"https://api.github.com/users/markus2330/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markus2330/subscriptions","organizations_url":"https://api.github.com/users/markus2330/orgs","repos_url":"https://api.github.com/users/markus2330/repos","events_url":"https://api.github.com/users/markus2330/events{/privacy}","received_events_url":"https://api.github.com/users/markus2330/received_events","type":"User","site_admin":false},"body":"and elektraFree","created_at":"2016-10-09T21:16:27Z","updated_at":"2016-10-09T21:16:53Z","html_url":"https://github.com/ElektraInitiative/libelektra/pull/1013#discussion_r82531805","pull_request_url":"https://api.github.com/repos/ElektraInitiative/libelektra/pulls/1013","_links":{"self":{"href":"https://api.github.com/repos/ElektraInitiative/libelektra/pulls/comments/82531805"},"html":{"href":"https://github.com/ElektraInitiative/libelektra/pull/1013#discussion_r82531805"},"pull_request":{"href":"https://api.github.com/repos/ElektraInitiative/libelektra/pulls/1013"}}},"pull_request":{"url":"https://api.github.com/repos/ElektraInitiative/libelektra/pulls/1013","id":88590332,"html_url":"https://github.com/ElektraInitiative/libelektra/pull/1013","diff_url":"https://github.com/ElektraInitiative/libelektra/pull/1013.diff","patch_url":"https://github.com/ElektraInitiative/libelektra/pull/1013.patch","issue_url":"https://api.github.com/repos/ElektraInitiative/libelektra/issues/1013","number":1013,"state":"open","locked":false,"title":"enum: multi-enum array","user":{"login":"tom-wa","id":13944659,"avatar_url":"https://avatars.githubusercontent.com/u/13944659?v=3","gravatar_id":"","url":"https://api.github.com/users/tom-wa","html_url":"https://github.com/tom-wa","followers_url":"https://api.github.com/users/tom-wa/followers","following_url":"https://api.github.com/users/tom-wa/following{/other_user}","gists_url":"https://api.github.com/users/tom-wa/gists{/gist_id}","starred_url":"https://api.github.com/users/tom-wa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tom-wa/subscriptions","organizations_url":"https://api.github.com/users/tom-wa/orgs","repos_url":"https://api.github.com/users/tom-wa/repos","events_url":"https://api.github.com/users/tom-wa/events{/privacy}","received_events_url":"https://api.github.com/users/tom-wa/received_events","type":"User","site_admin":false},"body":"@markus2330 would that work for you ?\r\n","created_at":"2016-10-09T18:49:13Z","updated_at":"2016-10-09T21:18:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"57d5a992984f52e466b9239d1841b39d9c3d1968","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ElektraInitiative/libelektra/pulls/1013/commits","review_comments_url":"https://api.github.com/repos/ElektraInitiative/libelektra/pulls/1013/comments","review_comment_url":"https://api.github.com/repos/ElektraInitiative/libelektra/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ElektraInitiative/libelektra/issues/1013/comments","statuses_url":"https://api.github.com/repos/ElektraInitiative/libelektra/statuses/b4b08811f1795c2830f04597960b96102b49022d","head":{"label":"tom-wa:multi_enum","ref":"multi_enum","sha":"b4b08811f1795c2830f04597960b96102b49022d","user":{"login":"tom-wa","id":13944659,"avatar_url":"https://avatars.githubusercontent.com/u/13944659?v=3","gravatar_id":"","url":"https://api.github.com/users/tom-wa","html_url":"https://github.com/tom-wa","followers_url":"https://api.github.com/users/tom-wa/followers","following_url":"https://api.github.com/users/tom-wa/following{/other_user}","gists_url":"https://api.github.com/users/tom-wa/gists{/gist_id}","starred_url":"https://api.github.com/users/tom-wa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tom-wa/subscriptions","organizations_url":"https://api.github.com/users/tom-wa/orgs","repos_url":"https://api.github.com/users/tom-wa/repos","events_url":"https://api.github.com/users/tom-wa/events{/privacy}","received_events_url":"https://api.github.com/users/tom-wa/received_events","type":"User","site_admin":false},"repo":{"id":42685319,"name":"libelektra","full_name":"tom-wa/libelektra","owner":{"login":"tom-wa","id":13944659,"avatar_url":"https://avatars.githubusercontent.com/u/13944659?v=3","gravatar_id":"","url":"https://api.github.com/users/tom-wa","html_url":"https://github.com/tom-wa","followers_url":"https://api.github.com/users/tom-wa/followers","following_url":"https://api.github.com/users/tom-wa/following{/other_user}","gists_url":"https://api.github.com/users/tom-wa/gists{/gist_id}","starred_url":"https://api.github.com/users/tom-wa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tom-wa/subscriptions","organizations_url":"https://api.github.com/users/tom-wa/orgs","repos_url":"https://api.github.com/users/tom-wa/repos","events_url":"https://api.github.com/users/tom-wa/events{/privacy}","received_events_url":"https://api.github.com/users/tom-wa/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tom-wa/libelektra","description":"Elektra provides a universal and secure framework to store configuration parameters in a global, hierarchical key database.","fork":true,"url":"https://api.github.com/repos/tom-wa/libelektra","forks_url":"https://api.github.com/repos/tom-wa/libelektra/forks","keys_url":"https://api.github.com/repos/tom-wa/libelektra/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tom-wa/libelektra/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tom-wa/libelektra/teams","hooks_url":"https://api.github.com/repos/tom-wa/libelektra/hooks","issue_events_url":"https://api.github.com/repos/tom-wa/libelektra/issues/events{/number}","events_url":"https://api.github.com/repos/tom-wa/libelektra/events","assignees_url":"https://api.github.com/repos/tom-wa/libelektra/assignees{/user}","branches_url":"https://api.github.com/repos/tom-wa/libelektra/branches{/branch}","tags_url":"https://api.github.com/repos/tom-wa/libelektra/tags","blobs_url":"https://api.github.com/repos/tom-wa/libelektra/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tom-wa/libelektra/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tom-wa/libelektra/git/refs{/sha}","trees_url":"https://api.github.com/repos/tom-wa/libelektra/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tom-wa/libelektra/statuses/{sha}","languages_url":"https://api.github.com/repos/tom-wa/libelektra/languages","stargazers_url":"https://api.github.com/repos/tom-wa/libelektra/stargazers","contributors_url":"https://api.github.com/repos/tom-wa/libelektra/contributors","subscribers_url":"https://api.github.com/repos/tom-wa/libelektra/subscribers","subscription_url":"https://api.github.com/repos/tom-wa/libelektra/subscription","commits_url":"https://api.github.com/repos/tom-wa/libelektra/commits{/sha}","git_commits_url":"https://api.github.com/repos/tom-wa/libelektra/git/commits{/sha}","comments_url":"https://api.github.com/repos/tom-wa/libelektra/comments{/number}","issue_comment_url":"https://api.github.com/repos/tom-wa/libelektra/issues/comments{/number}","contents_url":"https://api.github.com/repos/tom-wa/libelektra/contents/{+path}","compare_url":"https://api.github.com/repos/tom-wa/libelektra/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tom-wa/libelektra/merges","archive_url":"https://api.github.com/repos/tom-wa/libelektra/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tom-wa/libelektra/downloads","issues_url":"https://api.github.com/repos/tom-wa/libelektra/issues{/number}","pulls_url":"https://api.github.com/repos/tom-wa/libelektra/pulls{/number}","milestones_url":"https://api.github.com/repos/tom-wa/libelektra/milestones{/number}","notifications_url":"https://api.github.com/repos/tom-wa/libelektra/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tom-wa/libelektra/labels{/name}","releases_url":"https://api.github.com/repos/tom-wa/libelektra/releases{/id}","deployments_url":"https://api.github.com/repos/tom-wa/libelektra/deployments","created_at":"2015-09-17T22:27:25Z","updated_at":"2015-10-26T05:20:40Z","pushed_at":"2016-10-09T18:47:24Z","git_url":"git://github.com/tom-wa/libelektra.git","ssh_url":"git@github.com:tom-wa/libelektra.git","clone_url":"https://github.com/tom-wa/libelektra.git","svn_url":"https://github.com/tom-wa/libelektra","homepage":"","size":33872,"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":"ElektraInitiative:master","ref":"master","sha":"8348e4c34e15dc00cf2cb8603d3ff55b89e0db03","user":{"login":"ElektraInitiative","id":7949092,"avatar_url":"https://avatars.githubusercontent.com/u/7949092?v=3","gravatar_id":"","url":"https://api.github.com/users/ElektraInitiative","html_url":"https://github.com/ElektraInitiative","followers_url":"https://api.github.com/users/ElektraInitiative/followers","following_url":"https://api.github.com/users/ElektraInitiative/following{/other_user}","gists_url":"https://api.github.com/users/ElektraInitiative/gists{/gist_id}","starred_url":"https://api.github.com/users/ElektraInitiative/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ElektraInitiative/subscriptions","organizations_url":"https://api.github.com/users/ElektraInitiative/orgs","repos_url":"https://api.github.com/users/ElektraInitiative/repos","events_url":"https://api.github.com/users/ElektraInitiative/events{/privacy}","received_events_url":"https://api.github.com/users/ElektraInitiative/received_events","type":"Organization","site_admin":false},"repo":{"id":21063580,"name":"libelektra","full_name":"ElektraInitiative/libelektra","owner":{"login":"ElektraInitiative","id":7949092,"avatar_url":"https://avatars.githubusercontent.com/u/7949092?v=3","gravatar_id":"","url":"https://api.github.com/users/ElektraInitiative","html_url":"https://github.com/ElektraInitiative","followers_url":"https://api.github.com/users/ElektraInitiative/followers","following_url":"https://api.github.com/users/ElektraInitiative/following{/other_user}","gists_url":"https://api.github.com/users/ElektraInitiative/gists{/gist_id}","starred_url":"https://api.github.com/users/ElektraInitiative/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ElektraInitiative/subscriptions","organizations_url":"https://api.github.com/users/ElektraInitiative/orgs","repos_url":"https://api.github.com/users/ElektraInitiative/repos","events_url":"https://api.github.com/users/ElektraInitiative/events{/privacy}","received_events_url":"https://api.github.com/users/ElektraInitiative/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ElektraInitiative/libelektra","description":"Elektra serves as a universal and secure framework to access configuration parameters in a global, hierarchical key database.","fork":false,"url":"https://api.github.com/repos/ElektraInitiative/libelektra","forks_url":"https://api.github.com/repos/ElektraInitiative/libelektra/forks","keys_url":"https://api.github.com/repos/ElektraInitiative/libelektra/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ElektraInitiative/libelektra/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ElektraInitiative/libelektra/teams","hooks_url":"https://api.github.com/repos/ElektraInitiative/libelektra/hooks","issue_events_url":"https://api.github.com/repos/ElektraInitiative/libelektra/issues/events{/number}","events_url":"https://api.github.com/repos/ElektraInitiative/libelektra/events","assignees_url":"https://api.github.com/repos/ElektraInitiative/libelektra/assignees{/user}","branches_url":"https://api.github.com/repos/ElektraInitiative/libelektra/branches{/branch}","tags_url":"https://api.github.com/repos/ElektraInitiative/libelektra/tags","blobs_url":"https://api.github.com/repos/ElektraInitiative/libelektra/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ElektraInitiative/libelektra/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ElektraInitiative/libelektra/git/refs{/sha}","trees_url":"https://api.github.com/repos/ElektraInitiative/libelektra/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ElektraInitiative/libelektra/statuses/{sha}","languages_url":"https://api.github.com/repos/ElektraInitiative/libelektra/languages","stargazers_url":"https://api.github.com/repos/ElektraInitiative/libelektra/stargazers","contributors_url":"https://api.github.com/repos/ElektraInitiative/libelektra/contributors","subscribers_url":"https://api.github.com/repos/ElektraInitiative/libelektra/subscribers","subscription_url":"https://api.github.com/repos/ElektraInitiative/libelektra/subscription","commits_url":"https://api.github.com/repos/ElektraInitiative/libelektra/commits{/sha}","git_commits_url":"https://api.github.com/repos/ElektraInitiative/libelektra/git/commits{/sha}","comments_url":"https://api.github.com/repos/ElektraInitiative/libelektra/comments{/number}","issue_comment_url":"https://api.github.com/repos/ElektraInitiative/libelektra/issues/comments{/number}","contents_url":"https://api.github.com/repos/ElektraInitiative/libelektra/contents/{+path}","compare_url":"https://api.github.com/repos/ElektraInitiative/libelektra/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ElektraInitiative/libelektra/merges","archive_url":"https://api.github.com/repos/ElektraInitiative/libelektra/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ElektraInitiative/libelektra/downloads","issues_url":"https://api.github.com/repos/ElektraInitiative/libelektra/issues{/number}","pulls_url":"https://api.github.com/repos/ElektraInitiative/libelektra/pulls{/number}","milestones_url":"https://api.github.com/repos/ElektraInitiative/libelektra/milestones{/number}","notifications_url":"https://api.github.com/repos/ElektraInitiative/libelektra/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ElektraInitiative/libelektra/labels{/name}","releases_url":"https://api.github.com/repos/ElektraInitiative/libelektra/releases{/id}","deployments_url":"https://api.github.com/repos/ElektraInitiative/libelektra/deployments","created_at":"2014-06-21T08:01:04Z","updated_at":"2016-10-06T20:16:01Z","pushed_at":"2016-10-09T18:49:13Z","git_url":"git://github.com/ElektraInitiative/libelektra.git","ssh_url":"git@github.com:ElektraInitiative/libelektra.git","clone_url":"https://github.com/ElektraInitiative/libelektra.git","svn_url":"https://github.com/ElektraInitiative/libelektra","homepage":"http://libelektra.org","size":34632,"stargazers_count":37,"watchers_count":37,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":27,"mirror_url":null,"open_issues_count":178,"forks":27,"open_issues":178,"watchers":37,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ElektraInitiative/libelektra/pulls/1013"},"html":{"href":"https://github.com/ElektraInitiative/libelektra/pull/1013"},"issue":{"href":"https://api.github.com/repos/ElektraInitiative/libelektra/issues/1013"},"comments":{"href":"https://api.github.com/repos/ElektraInitiative/libelektra/issues/1013/comments"},"review_comments":{"href":"https://api.github.com/repos/ElektraInitiative/libelektra/pulls/1013/comments"},"review_comment":{"href":"https://api.github.com/repos/ElektraInitiative/libelektra/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ElektraInitiative/libelektra/pulls/1013/commits"},"statuses":{"href":"https://api.github.com/repos/ElektraInitiative/libelektra/statuses/b4b08811f1795c2830f04597960b96102b49022d"}}}}
{"actor":{"display_login":"markus2330"}}