{"action":"created","comment":{"url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/pulls/comments/37128178","id":37128178,"diff_hunk":"@@ -276,62 +272,54 @@ get_user_id (GVariant *session_parameters, guint32 *user_id)\n     return TRUE;\n }\n \n-/*\n- * Return TRUE if the given parameters of a SessionNew or SessionRemoved signal\n- * correspond to a human session. If the given parameters don't correspond to a\n- * human session, or this can't be determined, return FALSE.\n- */\n static gboolean\n-is_human_session (GVariant *session_parameters)\n+is_human_session (const gchar *session_id)\n {\n-    guint32 user_id;\n-    if (!get_user_id (session_parameters, &user_id))\n-      return FALSE;\n-    return user_id >= MIN_HUMAN_USER_ID;\n+    /* All normal user sessions start with digits -- greeter sessions\n+     * start with 'c'.\n+     */\n+    return g_ascii_isdigit (session_id[0]);\n }\n \n /*\n- * If the given parameters of a SessionNew or SessionRemoved signal correspond\n- * to a human session, return TRUE and add the corresponding session_id to the\n- * humanity_by_session_id set. Otherwise, return FALSE.\n+ * If the given session_id corresponds to a human session not already in the set\n+ * return TRUE and add the corresponding session_id to the humanity_by_session_id\n+ * set. Otherwise, return FALSE.\n  */\n static gboolean\n-add_session_to_set (GVariant *session_parameters)\n+add_session_to_set (const gchar *session_id)\n {\n-    if (!is_human_session (session_parameters))\n+    if (!is_human_session (session_id))\n+      return FALSE;\n+\n+    gboolean in_set = (gboolean) GPOINTER_TO_UINT (","path":"src/eos-metrics-instrumentation.c","position":null,"original_position":79,"commit_id":"1c1485570dcb618f7f892d315fad27569736c8f4","original_commit_id":"6d47f7b3d0f523b6a6d1f9c276ec6de6dc9f582e","user":{"login":"Kurt-von-Laven","id":974910,"avatar_url":"https://avatars.githubusercontent.com/u/974910?v=3","gravatar_id":"","url":"https://api.github.com/users/Kurt-von-Laven","html_url":"https://github.com/Kurt-von-Laven","followers_url":"https://api.github.com/users/Kurt-von-Laven/followers","following_url":"https://api.github.com/users/Kurt-von-Laven/following{/other_user}","gists_url":"https://api.github.com/users/Kurt-von-Laven/gists{/gist_id}","starred_url":"https://api.github.com/users/Kurt-von-Laven/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kurt-von-Laven/subscriptions","organizations_url":"https://api.github.com/users/Kurt-von-Laven/orgs","repos_url":"https://api.github.com/users/Kurt-von-Laven/repos","events_url":"https://api.github.com/users/Kurt-von-Laven/events{/privacy}","received_events_url":"https://api.github.com/users/Kurt-von-Laven/received_events","type":"User","site_admin":false},"body":"I don't understand; the style guide doesn't suggest this line break.","created_at":"2015-08-14T23:25:46Z","updated_at":"2015-08-14T23:25:46Z","html_url":"https://github.com/endlessm/eos-metrics-instrumentation/pull/52#discussion_r37128178","pull_request_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/pulls/52","_links":{"self":{"href":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/pulls/comments/37128178"},"html":{"href":"https://github.com/endlessm/eos-metrics-instrumentation/pull/52#discussion_r37128178"},"pull_request":{"href":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/pulls/52"}}},"pull_request":{"url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/pulls/52","id":42414925,"html_url":"https://github.com/endlessm/eos-metrics-instrumentation/pull/52","diff_url":"https://github.com/endlessm/eos-metrics-instrumentation/pull/52.diff","patch_url":"https://github.com/endlessm/eos-metrics-instrumentation/pull/52.patch","issue_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/issues/52","number":52,"state":"open","locked":false,"title":"Sdk/3477","user":{"login":"magcius","id":40890,"avatar_url":"https://avatars.githubusercontent.com/u/40890?v=3","gravatar_id":"","url":"https://api.github.com/users/magcius","html_url":"https://github.com/magcius","followers_url":"https://api.github.com/users/magcius/followers","following_url":"https://api.github.com/users/magcius/following{/other_user}","gists_url":"https://api.github.com/users/magcius/gists{/gist_id}","starred_url":"https://api.github.com/users/magcius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magcius/subscriptions","organizations_url":"https://api.github.com/users/magcius/orgs","repos_url":"https://api.github.com/users/magcius/repos","events_url":"https://api.github.com/users/magcius/events{/privacy}","received_events_url":"https://api.github.com/users/magcius/received_events","type":"User","site_admin":false},"body":"[endlessm/eos-sdk#3477]","created_at":"2015-08-14T00:41:16Z","updated_at":"2015-08-14T23:25:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bce46f177e9fbbd517dbc221e6ef88f5c92c7100","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/pulls/52/commits","review_comments_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/pulls/52/comments","review_comment_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/pulls/comments{/number}","comments_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/issues/52/comments","statuses_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/statuses/1c1485570dcb618f7f892d315fad27569736c8f4","head":{"label":"endlessm:sdk/3477","ref":"sdk/3477","sha":"1c1485570dcb618f7f892d315fad27569736c8f4","user":{"login":"endlessm","id":1930958,"avatar_url":"https://avatars.githubusercontent.com/u/1930958?v=3","gravatar_id":"","url":"https://api.github.com/users/endlessm","html_url":"https://github.com/endlessm","followers_url":"https://api.github.com/users/endlessm/followers","following_url":"https://api.github.com/users/endlessm/following{/other_user}","gists_url":"https://api.github.com/users/endlessm/gists{/gist_id}","starred_url":"https://api.github.com/users/endlessm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/endlessm/subscriptions","organizations_url":"https://api.github.com/users/endlessm/orgs","repos_url":"https://api.github.com/users/endlessm/repos","events_url":"https://api.github.com/users/endlessm/events{/privacy}","received_events_url":"https://api.github.com/users/endlessm/received_events","type":"Organization","site_admin":false},"repo":{"id":17677266,"name":"eos-metrics-instrumentation","full_name":"endlessm/eos-metrics-instrumentation","owner":{"login":"endlessm","id":1930958,"avatar_url":"https://avatars.githubusercontent.com/u/1930958?v=3","gravatar_id":"","url":"https://api.github.com/users/endlessm","html_url":"https://github.com/endlessm","followers_url":"https://api.github.com/users/endlessm/followers","following_url":"https://api.github.com/users/endlessm/following{/other_user}","gists_url":"https://api.github.com/users/endlessm/gists{/gist_id}","starred_url":"https://api.github.com/users/endlessm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/endlessm/subscriptions","organizations_url":"https://api.github.com/users/endlessm/orgs","repos_url":"https://api.github.com/users/endlessm/repos","events_url":"https://api.github.com/users/endlessm/events{/privacy}","received_events_url":"https://api.github.com/users/endlessm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/endlessm/eos-metrics-instrumentation","description":"Instrumentation daemons for eos-metrics","fork":false,"url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation","forks_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/forks","keys_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/teams","hooks_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/hooks","issue_events_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/issues/events{/number}","events_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/events","assignees_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/assignees{/user}","branches_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/branches{/branch}","tags_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/tags","blobs_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/git/refs{/sha}","trees_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/statuses/{sha}","languages_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/languages","stargazers_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/stargazers","contributors_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/contributors","subscribers_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/subscribers","subscription_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/subscription","commits_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/commits{/sha}","git_commits_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/git/commits{/sha}","comments_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/comments{/number}","issue_comment_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/issues/comments{/number}","contents_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/contents/{+path}","compare_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/merges","archive_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/downloads","issues_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/issues{/number}","pulls_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/pulls{/number}","milestones_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/milestones{/number}","notifications_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/labels{/name}","releases_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/releases{/id}","created_at":"2014-03-12T18:06:36Z","updated_at":"2015-04-16T22:57:40Z","pushed_at":"2015-08-14T23:24:55Z","git_url":"git://github.com/endlessm/eos-metrics-instrumentation.git","ssh_url":"git@github.com:endlessm/eos-metrics-instrumentation.git","clone_url":"https://github.com/endlessm/eos-metrics-instrumentation.git","svn_url":"https://github.com/endlessm/eos-metrics-instrumentation","homepage":null,"size":1041,"stargazers_count":1,"watchers_count":1,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":1,"default_branch":"master"}},"base":{"label":"endlessm:master","ref":"master","sha":"ff43df3ef1cd77e422d956faf7dd153487f63093","user":{"login":"endlessm","id":1930958,"avatar_url":"https://avatars.githubusercontent.com/u/1930958?v=3","gravatar_id":"","url":"https://api.github.com/users/endlessm","html_url":"https://github.com/endlessm","followers_url":"https://api.github.com/users/endlessm/followers","following_url":"https://api.github.com/users/endlessm/following{/other_user}","gists_url":"https://api.github.com/users/endlessm/gists{/gist_id}","starred_url":"https://api.github.com/users/endlessm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/endlessm/subscriptions","organizations_url":"https://api.github.com/users/endlessm/orgs","repos_url":"https://api.github.com/users/endlessm/repos","events_url":"https://api.github.com/users/endlessm/events{/privacy}","received_events_url":"https://api.github.com/users/endlessm/received_events","type":"Organization","site_admin":false},"repo":{"id":17677266,"name":"eos-metrics-instrumentation","full_name":"endlessm/eos-metrics-instrumentation","owner":{"login":"endlessm","id":1930958,"avatar_url":"https://avatars.githubusercontent.com/u/1930958?v=3","gravatar_id":"","url":"https://api.github.com/users/endlessm","html_url":"https://github.com/endlessm","followers_url":"https://api.github.com/users/endlessm/followers","following_url":"https://api.github.com/users/endlessm/following{/other_user}","gists_url":"https://api.github.com/users/endlessm/gists{/gist_id}","starred_url":"https://api.github.com/users/endlessm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/endlessm/subscriptions","organizations_url":"https://api.github.com/users/endlessm/orgs","repos_url":"https://api.github.com/users/endlessm/repos","events_url":"https://api.github.com/users/endlessm/events{/privacy}","received_events_url":"https://api.github.com/users/endlessm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/endlessm/eos-metrics-instrumentation","description":"Instrumentation daemons for eos-metrics","fork":false,"url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation","forks_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/forks","keys_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/teams","hooks_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/hooks","issue_events_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/issues/events{/number}","events_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/events","assignees_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/assignees{/user}","branches_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/branches{/branch}","tags_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/tags","blobs_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/git/refs{/sha}","trees_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/statuses/{sha}","languages_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/languages","stargazers_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/stargazers","contributors_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/contributors","subscribers_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/subscribers","subscription_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/subscription","commits_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/commits{/sha}","git_commits_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/git/commits{/sha}","comments_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/comments{/number}","issue_comment_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/issues/comments{/number}","contents_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/contents/{+path}","compare_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/merges","archive_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/downloads","issues_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/issues{/number}","pulls_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/pulls{/number}","milestones_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/milestones{/number}","notifications_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/labels{/name}","releases_url":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/releases{/id}","created_at":"2014-03-12T18:06:36Z","updated_at":"2015-04-16T22:57:40Z","pushed_at":"2015-08-14T23:24:55Z","git_url":"git://github.com/endlessm/eos-metrics-instrumentation.git","ssh_url":"git@github.com:endlessm/eos-metrics-instrumentation.git","clone_url":"https://github.com/endlessm/eos-metrics-instrumentation.git","svn_url":"https://github.com/endlessm/eos-metrics-instrumentation","homepage":null,"size":1041,"stargazers_count":1,"watchers_count":1,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/pulls/52"},"html":{"href":"https://github.com/endlessm/eos-metrics-instrumentation/pull/52"},"issue":{"href":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/issues/52"},"comments":{"href":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/issues/52/comments"},"review_comments":{"href":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/pulls/52/comments"},"review_comment":{"href":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/pulls/52/commits"},"statuses":{"href":"https://api.github.com/repos/endlessm/eos-metrics-instrumentation/statuses/1c1485570dcb618f7f892d315fad27569736c8f4"}}}}