Martin Kojtal / cc3000_hostdriver_mbedsocket Featured

Dependents:   cc3000_hello_world_demo cc3000_simple_socket_demo cc3000_ntp_demo cc3000_ping_demo ... more

Revision:
29:c40918cd9b6d
Parent:
5:245ac5b73132
Child:
48:192e2fde71e9
--- a/Socket/TCPSocketServer.cpp	Sat Oct 05 20:29:39 2013 +0200
+++ b/Socket/TCPSocketServer.cpp	Sun Oct 06 17:17:48 2013 +0200
@@ -75,6 +75,8 @@
     if (fd < 0) {
         return -1;
     }
+    /* s_addr is returned in the little endian */
+    connection._remote_host.sin_addr.s_addr = htonl(connection._remote_host.sin_addr.s_addr);
     connection._sock_fd = fd;
     connection._is_connected = true;