GitHub PullRequestReviewCommentEvent at 2014-08-05 01:15:28
Repository: libyrmcds
Actor: ymmt2005
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/cybozu/libyrmcds/pulls/comments/15791047","id":15791047,"diff_hunk":"@@ -115,11 +115,21 @@ yrmcds_error yrmcds_connect(yrmcds* c, const char* node, uint16_t port) {\n         errno = e;\n         return YRMCDS_SYSTEM_ERROR;\n     }\n+    *server_fd = s;\n+    return YRMCDS_OK;\n+}\n \n-    c->sock = s;\n-    e = pthread_mutex_init(&(c->lock), NULL);\n+yrmcds_error yrmcds_connect(yrmcds* c, const char* node, uint16_t port) {\n+    if( c == NULL )\n+        return YRMCDS_BAD_ARGUMENT;\n+    int server_fd;\n+    yrmcds_error err = connect_to_server(node, port, &server_fd);\n+    if( err != YRMCDS_OK )\n+        return err;\n+    c->sock = server_fd;\n+    int e = pthread_mutex_init(&(c->lock), NULL);","path":"connect.c","position":29,"original_position":29,"commit_id":"d42039584291d6cded317285febc1454d444c044","original_commit_id":"d42039584291d6cded317285febc1454d444c044","user":{"login":"ymmt2005","id":1461515,"avatar_url":"https://avatars.githubusercontent.com/u/1461515?v=2","gravatar_id":"ae03eb47606f4e0125268d39f8aebfad","url":"https://api.github.com/users/ymmt2005","html_url":"https://github.com/ymmt2005","followers_url":"https://api.github.com/users/ymmt2005/followers","following_url":"https://api.github.com/users/ymmt2005/following{/other_user}","gists_url":"https://api.github.com/users/ymmt2005/gists{/gist_id}","starred_url":"https://api.github.com/users/ymmt2005/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ymmt2005/subscriptions","organizations_url":"https://api.github.com/users/ymmt2005/orgs","repos_url":"https://api.github.com/users/ymmt2005/repos","events_url":"https://api.github.com/users/ymmt2005/events{/privacy}","received_events_url":"https://api.github.com/users/ymmt2005/received_events","type":"User","site_admin":false},"body":"`pthread_mutex_init` を connect 前にしておくと異常処理が楽","created_at":"2014-08-05T01:15:28Z","updated_at":"2014-08-05T01:15:28Z","html_url":"https://github.com/cybozu/libyrmcds/pull/1#discussion_r15791047","pull_request_url":"https://api.github.com/repos/cybozu/libyrmcds/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/cybozu/libyrmcds/pulls/comments/15791047"},"html":{"href":"https://github.com/cybozu/libyrmcds/pull/1#discussion_r15791047"},"pull_request":{"href":"https://api.github.com/repos/cybozu/libyrmcds/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/cybozu/libyrmcds/pulls/1","id":19265688,"html_url":"https://github.com/cybozu/libyrmcds/pull/1","diff_url":"https://github.com/cybozu/libyrmcds/pull/1.diff","patch_url":"https://github.com/cybozu/libyrmcds/pull/1.patch","issue_url":"https://api.github.com/repos/cybozu/libyrmcds/issues/1","number":1,"state":"open","title":"Implement APIs for the counter extension","user":{"login":"nojima","id":143913,"avatar_url":"https://avatars.githubusercontent.com/u/143913?v=2","gravatar_id":"66b94608924d43104d25cdb5ff7d96e2","url":"https://api.github.com/users/nojima","html_url":"https://github.com/nojima","followers_url":"https://api.github.com/users/nojima/followers","following_url":"https://api.github.com/users/nojima/following{/other_user}","gists_url":"https://api.github.com/users/nojima/gists{/gist_id}","starred_url":"https://api.github.com/users/nojima/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nojima/subscriptions","organizations_url":"https://api.github.com/users/nojima/orgs","repos_url":"https://api.github.com/users/nojima/repos","events_url":"https://api.github.com/users/nojima/events{/privacy}","received_events_url":"https://api.github.com/users/nojima/received_events","type":"User","site_admin":false},"body":"","created_at":"2014-08-04T05:33:45Z","updated_at":"2014-08-05T01:15:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d443e7138ced1af6535abd06b56568d93a92457d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/cybozu/libyrmcds/pulls/1/commits","review_comments_url":"https://api.github.com/repos/cybozu/libyrmcds/pulls/1/comments","review_comment_url":"https://api.github.com/repos/cybozu/libyrmcds/pulls/comments/{number}","comments_url":"https://api.github.com/repos/cybozu/libyrmcds/issues/1/comments","statuses_url":"https://api.github.com/repos/cybozu/libyrmcds/statuses/d42039584291d6cded317285febc1454d444c044","head":{"label":"cybozu:counter-extension","ref":"counter-extension","sha":"d42039584291d6cded317285febc1454d444c044","user":{"login":"cybozu","id":2433152,"avatar_url":"https://avatars.githubusercontent.com/u/2433152?v=2","gravatar_id":null,"url":"https://api.github.com/users/cybozu","html_url":"https://github.com/cybozu","followers_url":"https://api.github.com/users/cybozu/followers","following_url":"https://api.github.com/users/cybozu/following{/other_user}","gists_url":"https://api.github.com/users/cybozu/gists{/gist_id}","starred_url":"https://api.github.com/users/cybozu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cybozu/subscriptions","organizations_url":"https://api.github.com/users/cybozu/orgs","repos_url":"https://api.github.com/users/cybozu/repos","events_url":"https://api.github.com/users/cybozu/events{/privacy}","received_events_url":"https://api.github.com/users/cybozu/received_events","type":"Organization","site_admin":false},"repo":{"id":11721559,"name":"libyrmcds","full_name":"cybozu/libyrmcds","owner":{"login":"cybozu","id":2433152,"avatar_url":"https://avatars.githubusercontent.com/u/2433152?v=2","gravatar_id":null,"url":"https://api.github.com/users/cybozu","html_url":"https://github.com/cybozu","followers_url":"https://api.github.com/users/cybozu/followers","following_url":"https://api.github.com/users/cybozu/following{/other_user}","gists_url":"https://api.github.com/users/cybozu/gists{/gist_id}","starred_url":"https://api.github.com/users/cybozu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cybozu/subscriptions","organizations_url":"https://api.github.com/users/cybozu/orgs","repos_url":"https://api.github.com/users/cybozu/repos","events_url":"https://api.github.com/users/cybozu/events{/privacy}","received_events_url":"https://api.github.com/users/cybozu/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cybozu/libyrmcds","description":"A memcached client library for C/C++.  Best suited to yrmcds.","fork":false,"url":"https://api.github.com/repos/cybozu/libyrmcds","forks_url":"https://api.github.com/repos/cybozu/libyrmcds/forks","keys_url":"https://api.github.com/repos/cybozu/libyrmcds/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cybozu/libyrmcds/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cybozu/libyrmcds/teams","hooks_url":"https://api.github.com/repos/cybozu/libyrmcds/hooks","issue_events_url":"https://api.github.com/repos/cybozu/libyrmcds/issues/events{/number}","events_url":"https://api.github.com/repos/cybozu/libyrmcds/events","assignees_url":"https://api.github.com/repos/cybozu/libyrmcds/assignees{/user}","branches_url":"https://api.github.com/repos/cybozu/libyrmcds/branches{/branch}","tags_url":"https://api.github.com/repos/cybozu/libyrmcds/tags","blobs_url":"https://api.github.com/repos/cybozu/libyrmcds/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cybozu/libyrmcds/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cybozu/libyrmcds/git/refs{/sha}","trees_url":"https://api.github.com/repos/cybozu/libyrmcds/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cybozu/libyrmcds/statuses/{sha}","languages_url":"https://api.github.com/repos/cybozu/libyrmcds/languages","stargazers_url":"https://api.github.com/repos/cybozu/libyrmcds/stargazers","contributors_url":"https://api.github.com/repos/cybozu/libyrmcds/contributors","subscribers_url":"https://api.github.com/repos/cybozu/libyrmcds/subscribers","subscription_url":"https://api.github.com/repos/cybozu/libyrmcds/subscription","commits_url":"https://api.github.com/repos/cybozu/libyrmcds/commits{/sha}","git_commits_url":"https://api.github.com/repos/cybozu/libyrmcds/git/commits{/sha}","comments_url":"https://api.github.com/repos/cybozu/libyrmcds/comments{/number}","issue_comment_url":"https://api.github.com/repos/cybozu/libyrmcds/issues/comments/{number}","contents_url":"https://api.github.com/repos/cybozu/libyrmcds/contents/{+path}","compare_url":"https://api.github.com/repos/cybozu/libyrmcds/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cybozu/libyrmcds/merges","archive_url":"https://api.github.com/repos/cybozu/libyrmcds/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cybozu/libyrmcds/downloads","issues_url":"https://api.github.com/repos/cybozu/libyrmcds/issues{/number}","pulls_url":"https://api.github.com/repos/cybozu/libyrmcds/pulls{/number}","milestones_url":"https://api.github.com/repos/cybozu/libyrmcds/milestones{/number}","notifications_url":"https://api.github.com/repos/cybozu/libyrmcds/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cybozu/libyrmcds/labels{/name}","releases_url":"https://api.github.com/repos/cybozu/libyrmcds/releases{/id}","created_at":"2013-07-28T15:31:15Z","updated_at":"2014-05-23T02:34:17Z","pushed_at":"2014-08-05T01:12:17Z","git_url":"git://github.com/cybozu/libyrmcds.git","ssh_url":"git@github.com:cybozu/libyrmcds.git","clone_url":"https://github.com/cybozu/libyrmcds.git","svn_url":"https://github.com/cybozu/libyrmcds","homepage":"http://cybozu.github.io/libyrmcds/","size":440,"stargazers_count":1,"watchers_count":1,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"cybozu:master","ref":"master","sha":"4f674e2b4890832acb5078a0c75b360ebf66e2a8","user":{"login":"cybozu","id":2433152,"avatar_url":"https://avatars.githubusercontent.com/u/2433152?v=2","gravatar_id":null,"url":"https://api.github.com/users/cybozu","html_url":"https://github.com/cybozu","followers_url":"https://api.github.com/users/cybozu/followers","following_url":"https://api.github.com/users/cybozu/following{/other_user}","gists_url":"https://api.github.com/users/cybozu/gists{/gist_id}","starred_url":"https://api.github.com/users/cybozu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cybozu/subscriptions","organizations_url":"https://api.github.com/users/cybozu/orgs","repos_url":"https://api.github.com/users/cybozu/repos","events_url":"https://api.github.com/users/cybozu/events{/privacy}","received_events_url":"https://api.github.com/users/cybozu/received_events","type":"Organization","site_admin":false},"repo":{"id":11721559,"name":"libyrmcds","full_name":"cybozu/libyrmcds","owner":{"login":"cybozu","id":2433152,"avatar_url":"https://avatars.githubusercontent.com/u/2433152?v=2","gravatar_id":null,"url":"https://api.github.com/users/cybozu","html_url":"https://github.com/cybozu","followers_url":"https://api.github.com/users/cybozu/followers","following_url":"https://api.github.com/users/cybozu/following{/other_user}","gists_url":"https://api.github.com/users/cybozu/gists{/gist_id}","starred_url":"https://api.github.com/users/cybozu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cybozu/subscriptions","organizations_url":"https://api.github.com/users/cybozu/orgs","repos_url":"https://api.github.com/users/cybozu/repos","events_url":"https://api.github.com/users/cybozu/events{/privacy}","received_events_url":"https://api.github.com/users/cybozu/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cybozu/libyrmcds","description":"A memcached client library for C/C++.  Best suited to yrmcds.","fork":false,"url":"https://api.github.com/repos/cybozu/libyrmcds","forks_url":"https://api.github.com/repos/cybozu/libyrmcds/forks","keys_url":"https://api.github.com/repos/cybozu/libyrmcds/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cybozu/libyrmcds/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cybozu/libyrmcds/teams","hooks_url":"https://api.github.com/repos/cybozu/libyrmcds/hooks","issue_events_url":"https://api.github.com/repos/cybozu/libyrmcds/issues/events{/number}","events_url":"https://api.github.com/repos/cybozu/libyrmcds/events","assignees_url":"https://api.github.com/repos/cybozu/libyrmcds/assignees{/user}","branches_url":"https://api.github.com/repos/cybozu/libyrmcds/branches{/branch}","tags_url":"https://api.github.com/repos/cybozu/libyrmcds/tags","blobs_url":"https://api.github.com/repos/cybozu/libyrmcds/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cybozu/libyrmcds/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cybozu/libyrmcds/git/refs{/sha}","trees_url":"https://api.github.com/repos/cybozu/libyrmcds/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cybozu/libyrmcds/statuses/{sha}","languages_url":"https://api.github.com/repos/cybozu/libyrmcds/languages","stargazers_url":"https://api.github.com/repos/cybozu/libyrmcds/stargazers","contributors_url":"https://api.github.com/repos/cybozu/libyrmcds/contributors","subscribers_url":"https://api.github.com/repos/cybozu/libyrmcds/subscribers","subscription_url":"https://api.github.com/repos/cybozu/libyrmcds/subscription","commits_url":"https://api.github.com/repos/cybozu/libyrmcds/commits{/sha}","git_commits_url":"https://api.github.com/repos/cybozu/libyrmcds/git/commits{/sha}","comments_url":"https://api.github.com/repos/cybozu/libyrmcds/comments{/number}","issue_comment_url":"https://api.github.com/repos/cybozu/libyrmcds/issues/comments/{number}","contents_url":"https://api.github.com/repos/cybozu/libyrmcds/contents/{+path}","compare_url":"https://api.github.com/repos/cybozu/libyrmcds/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cybozu/libyrmcds/merges","archive_url":"https://api.github.com/repos/cybozu/libyrmcds/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cybozu/libyrmcds/downloads","issues_url":"https://api.github.com/repos/cybozu/libyrmcds/issues{/number}","pulls_url":"https://api.github.com/repos/cybozu/libyrmcds/pulls{/number}","milestones_url":"https://api.github.com/repos/cybozu/libyrmcds/milestones{/number}","notifications_url":"https://api.github.com/repos/cybozu/libyrmcds/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cybozu/libyrmcds/labels{/name}","releases_url":"https://api.github.com/repos/cybozu/libyrmcds/releases{/id}","created_at":"2013-07-28T15:31:15Z","updated_at":"2014-05-23T02:34:17Z","pushed_at":"2014-08-05T01:12:17Z","git_url":"git://github.com/cybozu/libyrmcds.git","ssh_url":"git@github.com:cybozu/libyrmcds.git","clone_url":"https://github.com/cybozu/libyrmcds.git","svn_url":"https://github.com/cybozu/libyrmcds","homepage":"http://cybozu.github.io/libyrmcds/","size":440,"stargazers_count":1,"watchers_count":1,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cybozu/libyrmcds/pulls/1"},"html":{"href":"https://github.com/cybozu/libyrmcds/pull/1"},"issue":{"href":"https://api.github.com/repos/cybozu/libyrmcds/issues/1"},"comments":{"href":"https://api.github.com/repos/cybozu/libyrmcds/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/cybozu/libyrmcds/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/cybozu/libyrmcds/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/cybozu/libyrmcds/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/cybozu/libyrmcds/statuses/d42039584291d6cded317285febc1454d444c044"}}}}