ros-industrial / industrial_core

ROS-Industrial core communication packages (http://wiki.ros.org/industrial_core)
154 stars 181 forks source link

simple_message: get rid of obsolete gethostbyname #197

Closed machinekoder closed 6 years ago

machinekoder commented 6 years ago

fix for https://github.com/ros-industrial/industrial_core/issues/108

NOTE: For some reason the run_tests fail on my system, but they also fail without the patch, so I want to see how the CI handles this patch.

gavanderhoorn commented 6 years ago

Thanks for the PR, and thanks for your WRID18 participation.

Would it be nice to print an info/warning message whenever name resolution doesn't work?

NOTE: For some reason the run_tests fail on my system, but they also fail without the patch, so I want to see how the CI handles this patch.

seems CI is happy with your changes, I see a checkmark.

machinekoder commented 6 years ago

@gavanderhoorn The current behavior implicitly assumes that the buff content is either a hostname which can be resolved or an IP address. So printing a warning would cause a warning to be printed whenever one wants to use an explicit IP-address.

So either we change the code to reverse the behavior, first trying to use the buffer contents as an IP-address, then trying to resolve it or it would change the current behavior.

gavanderhoorn commented 6 years ago

Travis failed because of a time-out, not because of something in this PR.

I'll merge.

gavanderhoorn commented 6 years ago

Thanks again @machinekoder :+1: