GitHub PullRequestReviewCommentEvent at 2014-10-30 19:39:18
Repository: industrial_core
Actor: frederickproctor
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/ros-industrial/industrial_core/pulls/comments/19630841","id":19630841,"diff_hunk":"@@ -70,10 +72,16 @@ bool TcpClient::init(char *buff, int port_num)\n       LOG_WARN(\"Failed to set no socket delay, sending data can be delayed by up to 250ms\");\r\n     }\r\n \r\n+\r\n     // Initialize address data structure\r\n     memset(&this->sockaddr_, 0, sizeof(this->sockaddr_));\r\n     this->sockaddr_.sin_family = AF_INET;\r\n-    this->sockaddr_.sin_addr.s_addr = INET_ADDR(buff);\r\n+    if (NULL != (ent = gethostbyname(buff))) {\r\n+      in_a = (struct in_addr *) ent->h_addr_list[0];\r\n+      this->sockaddr_.sin_addr.s_addr = in_a->s_addr;\r\n+    } else {\r","path":"simple_message/src/socket/tcp_client.cpp","position":null,"original_position":21,"commit_id":"5592ff96f68dc17c0de9816c00fe210a91b5920d","original_commit_id":"aa9b575b526748e6df6bbdedeb07abdab8f446aa","user":{"login":"frederickproctor","id":5540993,"avatar_url":"https://avatars.githubusercontent.com/u/5540993?v=2","gravatar_id":"","url":"https://api.github.com/users/frederickproctor","html_url":"https://github.com/frederickproctor","followers_url":"https://api.github.com/users/frederickproctor/followers","following_url":"https://api.github.com/users/frederickproctor/following{/other_user}","gists_url":"https://api.github.com/users/frederickproctor/gists{/gist_id}","starred_url":"https://api.github.com/users/frederickproctor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frederickproctor/subscriptions","organizations_url":"https://api.github.com/users/frederickproctor/orgs","repos_url":"https://api.github.com/users/frederickproctor/repos","events_url":"https://api.github.com/users/frederickproctor/events{/privacy}","received_events_url":"https://api.github.com/users/frederickproctor/received_events","type":"User","site_admin":false},"body":"Thanks for your coding comments, Shaun. I made the edits you noted, to wit: \r\n1. Macro'ed out gethostbyname in both the Linux and Motoman sections of simple_socket.h, with the Motoman resulting in NULL. Called that macro in tcp_client.c.\r\n2. Took out the /* gethostbyname*/ comment in the header, for consistency. \r\n3. Fixed the brace style in tcp_client.c, to be a new line for braces. I updated my emacs indenting accordingly. \r\nI think the first pull request is still pending, and you should see this new commit. \r\n--Fred\r\n      From: Shaun Edwards <notifications@github.com>\r\n To: ros-industrial/industrial_core <industrial_core@noreply.github.com> \r\nCc: Fred Proctor <frederickproctor@yahoo.com> \r\n Sent: Thursday, October 30, 2014 11:13 AM\r\n Subject: Re: [industrial_core] Added support for gethostbyname, for passing host names in addition to I... (#87)\r\n   \r\nIn simple_message/src/socket/tcp_client.cpp:>      // Initialize address data structure\r\n>      memset(&this->sockaddr_, 0, sizeof(this->sockaddr_));\r\n>      this->sockaddr_.sin_family = AF_INET;\r\n> -    this->sockaddr_.sin_addr.s_addr = INET_ADDR(buff);\r\n> +    if (NULL != (ent = gethostbyname(buff))) {\r\n> +      in_a = (struct in_addr *) ent->h_addr_list[0];\r\n> +      this->sockaddr_.sin_addr.s_addr = in_a->s_addr;\r\n> +    } else {\r\nSame here for {—\r\nReply to this email directly or view it on GitHub.","created_at":"2014-10-30T19:39:18Z","updated_at":"2014-10-30T19:39:18Z","html_url":"https://github.com/ros-industrial/industrial_core/pull/87#discussion_r19630841","pull_request_url":"https://api.github.com/repos/ros-industrial/industrial_core/pulls/87","_links":{"self":{"href":"https://api.github.com/repos/ros-industrial/industrial_core/pulls/comments/19630841"},"html":{"href":"https://github.com/ros-industrial/industrial_core/pull/87#discussion_r19630841"},"pull_request":{"href":"https://api.github.com/repos/ros-industrial/industrial_core/pulls/87"}}},"pull_request":{"url":"https://api.github.com/repos/ros-industrial/industrial_core/pulls/87","id":23604804,"html_url":"https://github.com/ros-industrial/industrial_core/pull/87","diff_url":"https://github.com/ros-industrial/industrial_core/pull/87.diff","patch_url":"https://github.com/ros-industrial/industrial_core/pull/87.patch","issue_url":"https://api.github.com/repos/ros-industrial/industrial_core/issues/87","number":87,"state":"open","locked":false,"title":"Added support for gethostbyname, for passing host names in addition to I...","user":{"login":"frederickproctor","id":5540993,"avatar_url":"https://avatars.githubusercontent.com/u/5540993?v=2","gravatar_id":"","url":"https://api.github.com/users/frederickproctor","html_url":"https://github.com/frederickproctor","followers_url":"https://api.github.com/users/frederickproctor/followers","following_url":"https://api.github.com/users/frederickproctor/following{/other_user}","gists_url":"https://api.github.com/users/frederickproctor/gists{/gist_id}","starred_url":"https://api.github.com/users/frederickproctor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frederickproctor/subscriptions","organizations_url":"https://api.github.com/users/frederickproctor/orgs","repos_url":"https://api.github.com/users/frederickproctor/repos","events_url":"https://api.github.com/users/frederickproctor/events{/privacy}","received_events_url":"https://api.github.com/users/frederickproctor/received_events","type":"User","site_admin":false},"body":"...P addresses.","created_at":"2014-10-30T13:39:58Z","updated_at":"2014-10-30T19:39:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dd0027b7162ab8712c8bc621b80ac2cec43a9faa","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ros-industrial/industrial_core/pulls/87/commits","review_comments_url":"https://api.github.com/repos/ros-industrial/industrial_core/pulls/87/comments","review_comment_url":"https://api.github.com/repos/ros-industrial/industrial_core/pulls/comments/{number}","comments_url":"https://api.github.com/repos/ros-industrial/industrial_core/issues/87/comments","statuses_url":"https://api.github.com/repos/ros-industrial/industrial_core/statuses/5592ff96f68dc17c0de9816c00fe210a91b5920d","head":{"label":"frederickproctor:gethostbyname","ref":"gethostbyname","sha":"5592ff96f68dc17c0de9816c00fe210a91b5920d","user":{"login":"frederickproctor","id":5540993,"avatar_url":"https://avatars.githubusercontent.com/u/5540993?v=2","gravatar_id":"","url":"https://api.github.com/users/frederickproctor","html_url":"https://github.com/frederickproctor","followers_url":"https://api.github.com/users/frederickproctor/followers","following_url":"https://api.github.com/users/frederickproctor/following{/other_user}","gists_url":"https://api.github.com/users/frederickproctor/gists{/gist_id}","starred_url":"https://api.github.com/users/frederickproctor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frederickproctor/subscriptions","organizations_url":"https://api.github.com/users/frederickproctor/orgs","repos_url":"https://api.github.com/users/frederickproctor/repos","events_url":"https://api.github.com/users/frederickproctor/events{/privacy}","received_events_url":"https://api.github.com/users/frederickproctor/received_events","type":"User","site_admin":false},"repo":{"id":25969625,"name":"industrial_core","full_name":"frederickproctor/industrial_core","owner":{"login":"frederickproctor","id":5540993,"avatar_url":"https://avatars.githubusercontent.com/u/5540993?v=2","gravatar_id":"","url":"https://api.github.com/users/frederickproctor","html_url":"https://github.com/frederickproctor","followers_url":"https://api.github.com/users/frederickproctor/followers","following_url":"https://api.github.com/users/frederickproctor/following{/other_user}","gists_url":"https://api.github.com/users/frederickproctor/gists{/gist_id}","starred_url":"https://api.github.com/users/frederickproctor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frederickproctor/subscriptions","organizations_url":"https://api.github.com/users/frederickproctor/orgs","repos_url":"https://api.github.com/users/frederickproctor/repos","events_url":"https://api.github.com/users/frederickproctor/events{/privacy}","received_events_url":"https://api.github.com/users/frederickproctor/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/frederickproctor/industrial_core","description":"ROS-Industrial core meta-package.  http://ros.org/wiki/industrial_core","fork":true,"url":"https://api.github.com/repos/frederickproctor/industrial_core","forks_url":"https://api.github.com/repos/frederickproctor/industrial_core/forks","keys_url":"https://api.github.com/repos/frederickproctor/industrial_core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/frederickproctor/industrial_core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/frederickproctor/industrial_core/teams","hooks_url":"https://api.github.com/repos/frederickproctor/industrial_core/hooks","issue_events_url":"https://api.github.com/repos/frederickproctor/industrial_core/issues/events{/number}","events_url":"https://api.github.com/repos/frederickproctor/industrial_core/events","assignees_url":"https://api.github.com/repos/frederickproctor/industrial_core/assignees{/user}","branches_url":"https://api.github.com/repos/frederickproctor/industrial_core/branches{/branch}","tags_url":"https://api.github.com/repos/frederickproctor/industrial_core/tags","blobs_url":"https://api.github.com/repos/frederickproctor/industrial_core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/frederickproctor/industrial_core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/frederickproctor/industrial_core/git/refs{/sha}","trees_url":"https://api.github.com/repos/frederickproctor/industrial_core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/frederickproctor/industrial_core/statuses/{sha}","languages_url":"https://api.github.com/repos/frederickproctor/industrial_core/languages","stargazers_url":"https://api.github.com/repos/frederickproctor/industrial_core/stargazers","contributors_url":"https://api.github.com/repos/frederickproctor/industrial_core/contributors","subscribers_url":"https://api.github.com/repos/frederickproctor/industrial_core/subscribers","subscription_url":"https://api.github.com/repos/frederickproctor/industrial_core/subscription","commits_url":"https://api.github.com/repos/frederickproctor/industrial_core/commits{/sha}","git_commits_url":"https://api.github.com/repos/frederickproctor/industrial_core/git/commits{/sha}","comments_url":"https://api.github.com/repos/frederickproctor/industrial_core/comments{/number}","issue_comment_url":"https://api.github.com/repos/frederickproctor/industrial_core/issues/comments/{number}","contents_url":"https://api.github.com/repos/frederickproctor/industrial_core/contents/{+path}","compare_url":"https://api.github.com/repos/frederickproctor/industrial_core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/frederickproctor/industrial_core/merges","archive_url":"https://api.github.com/repos/frederickproctor/industrial_core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/frederickproctor/industrial_core/downloads","issues_url":"https://api.github.com/repos/frederickproctor/industrial_core/issues{/number}","pulls_url":"https://api.github.com/repos/frederickproctor/industrial_core/pulls{/number}","milestones_url":"https://api.github.com/repos/frederickproctor/industrial_core/milestones{/number}","notifications_url":"https://api.github.com/repos/frederickproctor/industrial_core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/frederickproctor/industrial_core/labels{/name}","releases_url":"https://api.github.com/repos/frederickproctor/industrial_core/releases{/id}","created_at":"2014-10-30T12:24:42Z","updated_at":"2014-10-28T01:09:15Z","pushed_at":"2014-10-30T19:36:04Z","git_url":"git://github.com/frederickproctor/industrial_core.git","ssh_url":"git@github.com:frederickproctor/industrial_core.git","clone_url":"https://github.com/frederickproctor/industrial_core.git","svn_url":"https://github.com/frederickproctor/industrial_core","homepage":"","size":1589,"stargazers_count":0,"watchers_count":0,"language":null,"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":"hydro-devel"}},"base":{"label":"ros-industrial:hydro-devel","ref":"hydro-devel","sha":"1eca4f605dc3d4dfdcbd94d9622f0b2ffafff264","user":{"login":"ros-industrial","id":2932528,"avatar_url":"https://avatars.githubusercontent.com/u/2932528?v=2","gravatar_id":"","url":"https://api.github.com/users/ros-industrial","html_url":"https://github.com/ros-industrial","followers_url":"https://api.github.com/users/ros-industrial/followers","following_url":"https://api.github.com/users/ros-industrial/following{/other_user}","gists_url":"https://api.github.com/users/ros-industrial/gists{/gist_id}","starred_url":"https://api.github.com/users/ros-industrial/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ros-industrial/subscriptions","organizations_url":"https://api.github.com/users/ros-industrial/orgs","repos_url":"https://api.github.com/users/ros-industrial/repos","events_url":"https://api.github.com/users/ros-industrial/events{/privacy}","received_events_url":"https://api.github.com/users/ros-industrial/received_events","type":"Organization","site_admin":false},"repo":{"id":10469184,"name":"industrial_core","full_name":"ros-industrial/industrial_core","owner":{"login":"ros-industrial","id":2932528,"avatar_url":"https://avatars.githubusercontent.com/u/2932528?v=2","gravatar_id":"","url":"https://api.github.com/users/ros-industrial","html_url":"https://github.com/ros-industrial","followers_url":"https://api.github.com/users/ros-industrial/followers","following_url":"https://api.github.com/users/ros-industrial/following{/other_user}","gists_url":"https://api.github.com/users/ros-industrial/gists{/gist_id}","starred_url":"https://api.github.com/users/ros-industrial/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ros-industrial/subscriptions","organizations_url":"https://api.github.com/users/ros-industrial/orgs","repos_url":"https://api.github.com/users/ros-industrial/repos","events_url":"https://api.github.com/users/ros-industrial/events{/privacy}","received_events_url":"https://api.github.com/users/ros-industrial/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ros-industrial/industrial_core","description":"ROS-Industrial core meta-package.  http://ros.org/wiki/industrial_core","fork":false,"url":"https://api.github.com/repos/ros-industrial/industrial_core","forks_url":"https://api.github.com/repos/ros-industrial/industrial_core/forks","keys_url":"https://api.github.com/repos/ros-industrial/industrial_core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ros-industrial/industrial_core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ros-industrial/industrial_core/teams","hooks_url":"https://api.github.com/repos/ros-industrial/industrial_core/hooks","issue_events_url":"https://api.github.com/repos/ros-industrial/industrial_core/issues/events{/number}","events_url":"https://api.github.com/repos/ros-industrial/industrial_core/events","assignees_url":"https://api.github.com/repos/ros-industrial/industrial_core/assignees{/user}","branches_url":"https://api.github.com/repos/ros-industrial/industrial_core/branches{/branch}","tags_url":"https://api.github.com/repos/ros-industrial/industrial_core/tags","blobs_url":"https://api.github.com/repos/ros-industrial/industrial_core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ros-industrial/industrial_core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ros-industrial/industrial_core/git/refs{/sha}","trees_url":"https://api.github.com/repos/ros-industrial/industrial_core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ros-industrial/industrial_core/statuses/{sha}","languages_url":"https://api.github.com/repos/ros-industrial/industrial_core/languages","stargazers_url":"https://api.github.com/repos/ros-industrial/industrial_core/stargazers","contributors_url":"https://api.github.com/repos/ros-industrial/industrial_core/contributors","subscribers_url":"https://api.github.com/repos/ros-industrial/industrial_core/subscribers","subscription_url":"https://api.github.com/repos/ros-industrial/industrial_core/subscription","commits_url":"https://api.github.com/repos/ros-industrial/industrial_core/commits{/sha}","git_commits_url":"https://api.github.com/repos/ros-industrial/industrial_core/git/commits{/sha}","comments_url":"https://api.github.com/repos/ros-industrial/industrial_core/comments{/number}","issue_comment_url":"https://api.github.com/repos/ros-industrial/industrial_core/issues/comments/{number}","contents_url":"https://api.github.com/repos/ros-industrial/industrial_core/contents/{+path}","compare_url":"https://api.github.com/repos/ros-industrial/industrial_core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ros-industrial/industrial_core/merges","archive_url":"https://api.github.com/repos/ros-industrial/industrial_core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ros-industrial/industrial_core/downloads","issues_url":"https://api.github.com/repos/ros-industrial/industrial_core/issues{/number}","pulls_url":"https://api.github.com/repos/ros-industrial/industrial_core/pulls{/number}","milestones_url":"https://api.github.com/repos/ros-industrial/industrial_core/milestones{/number}","notifications_url":"https://api.github.com/repos/ros-industrial/industrial_core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ros-industrial/industrial_core/labels{/name}","releases_url":"https://api.github.com/repos/ros-industrial/industrial_core/releases{/id}","created_at":"2013-06-04T02:13:33Z","updated_at":"2014-10-28T01:09:15Z","pushed_at":"2014-10-28T01:10:28Z","git_url":"git://github.com/ros-industrial/industrial_core.git","ssh_url":"git@github.com:ros-industrial/industrial_core.git","clone_url":"https://github.com/ros-industrial/industrial_core.git","svn_url":"https://github.com/ros-industrial/industrial_core","homepage":"","size":1589,"stargazers_count":8,"watchers_count":8,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":21,"mirror_url":null,"open_issues_count":25,"forks":21,"open_issues":25,"watchers":8,"default_branch":"hydro-devel"}},"_links":{"self":{"href":"https://api.github.com/repos/ros-industrial/industrial_core/pulls/87"},"html":{"href":"https://github.com/ros-industrial/industrial_core/pull/87"},"issue":{"href":"https://api.github.com/repos/ros-industrial/industrial_core/issues/87"},"comments":{"href":"https://api.github.com/repos/ros-industrial/industrial_core/issues/87/comments"},"review_comments":{"href":"https://api.github.com/repos/ros-industrial/industrial_core/pulls/87/comments"},"review_comment":{"href":"https://api.github.com/repos/ros-industrial/industrial_core/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/ros-industrial/industrial_core/pulls/87/commits"},"statuses":{"href":"https://api.github.com/repos/ros-industrial/industrial_core/statuses/5592ff96f68dc17c0de9816c00fe210a91b5920d"}}}}