wip
Dependents: EthernetInterface_vz
Fork of Socket by
Diff: UDPSocket.cpp
- Revision:
- 25:de20f827fa8c
- Parent:
- 24:422fa048a516
- Child:
- 26:4c022b0e816a
--- a/UDPSocket.cpp Tue Apr 07 14:26:48 2015 +0000 +++ b/UDPSocket.cpp Thu Apr 30 15:42:10 2015 +0000 @@ -44,14 +44,16 @@ localHost.sin_family = AF_INET; localHost.sin_port = htons(port); - send_msg("bind of %d -- result in ( %d, %d )", port, htons(port), localHost.sin_port ); + + if ( debug_bind ) send_msg("bind of %d -- result in ( %d, %d )", port, htons(port), localHost.sin_port ); + localHost.sin_addr.s_addr = INADDR_ANY; if (lwip_bind(_sock_fd, (const struct sockaddr *) &localHost, sizeof(localHost)) < 0) { close(); return -1; } - send_msg("lwip_sock_portando_local_port %d - lwip_sock_portando_ntohs %d ", lwip_sock_portando_local_port, lwip_sock_portando_ntohs ); + if ( debug_bind ) send_msg("lwip_sock_portando_local_port %d - lwip_sock_portando_ntohs %d ", lwip_sock_portando_local_port, lwip_sock_portando_ntohs ); return 0; }