Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix exceptions if python is built without ipv6 support. #515

Closed
wants to merge 2 commits into from

Conversation

aballier
Copy link
Contributor

Admittedly a python bug, but the workaround is already present in other parts of this file.
@ros-pull-request-builder
Copy link
Member

Can one of the admins verify this patch?

if use_ipv6():
reverse_ips = [host[4][0] for host in socket.getaddrinfo(socket.gethostname(), 0, 0, 0, socket.SOL_TCP)]
else:
reverse_ips = [host[4][0] for host in socket.getaddrinfo(socket.gethostname(), 0, socket.AF_INET, 0, socket.SOL_TCP)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the same way as it is already used in other parts of the code (

). The change looks good - was probably just forgotten in the original patch for IPv6.

…pport.

A bit different than rosgraph fix because we do not have use_ipv6 here. See e.g. http://bugs.python.org/issue16208#msg178764
@dirk-thomas
Copy link
Member

Manually merged to address PEP8 issue: 2926581 f283fa9

@dirk-thomas
Copy link
Member

This change breaks a unit test: http://jenkins.ros.org/job/devel-indigo-ros_comm/125/ARCH_PARAM=amd64,UBUNTU_PARAM=trusty,label=devel/testReport/unit.test_roslaunch_launch/TestRoslaunchLaunch/test_validate_master_launch/

@aballier Why does you patch use socket.gethostname() instead of hostname?

And changed it back to use hostname again: bb13439

dirk-thomas added a commit that referenced this pull request Dec 10, 2014
mjyc pushed a commit to mjyc/ros_comm that referenced this pull request Dec 10, 2014
* upstream/indigo-devel:
  fix regression of PR ros#515
  Adding support for fixed-width floating-point and integer array values as per issue ros#400
  Fix exception at roslaunch startup if python is build without ipv6 support.
  Fix exception at roscore startup if python has ipv6 disabled.
  use fileno comparison only as an alternative and when available
  fix removal of QueuedConnection leading to wrong subscriber count (fix ros#526)
  fix comment (fix ros#529)
  unregister statistics publisher
  Fix: TCPROS header validation crash when `callerid` header is not set
  avoid storing subscriber reference in SubscriberStatisticsLogger
  only create SubscriberStatisticsLogger when enabled
  make param functions thread-safe
  Do not use Python when building for Android
  Do not use ifaddrs on Android as it is not natively supported
rsinnet pushed a commit to MisoRobotics/ros_comm that referenced this pull request Jun 19, 2017
* upstream/indigo-devel:
  fix regression of PR ros#515
  Adding support for fixed-width floating-point and integer array values as per issue ros#400
  Fix exception at roslaunch startup if python is build without ipv6 support.
  Fix exception at roscore startup if python has ipv6 disabled.
  use fileno comparison only as an alternative and when available
  fix removal of QueuedConnection leading to wrong subscriber count (fix ros#526)
  fix comment (fix ros#529)
  unregister statistics publisher
  Fix: TCPROS header validation crash when `callerid` header is not set
  avoid storing subscriber reference in SubscriberStatisticsLogger
  only create SubscriberStatisticsLogger when enabled
  make param functions thread-safe
  Do not use Python when building for Android
  Do not use ifaddrs on Android as it is not natively supported
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants