We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b849fbb commit aedd8e1Copy full SHA for aedd8e1
libraries/SITL/SIM_AirSim.cpp
@@ -55,12 +55,14 @@ AirSim::AirSim(const char *frame_str) :
55
*/
56
void AirSim::set_interface_ports(const char* address, const int port_in, const int port_out)
57
{
58
- if (!sock.bind("0.0.0.0", port_in)) {
+ static const char *port_in_addr = "0.0.0.0";
59
+
60
+ if (!sock.bind(port_in_addr, port_in)) {
61
printf("Unable to bind Airsim sensor_in socket at port %u - Error: %s\n",
62
port_in, strerror(errno));
63
return;
64
}
- printf("Bind SITL sensor input at %s:%u\n", "127.0.0.1", port_in);
65
+ printf("Bind SITL sensor input at %s:%u\n", port_in_addr, port_in);
66
sock.set_blocking(false);
67
sock.reuseaddress();
68
0 commit comments