SNICInterface for ThingPlug Example

Dependents:   ThingPlug_WiFi_Example ThingPlug_WiFi_Example_2

Fork of SNICInterface by muRata

Revision:
34:8c3527b8f44e
Parent:
33:33f1bc919486
Child:
36:f33fcf5975ab
diff -r 33f1bc919486 -r 8c3527b8f44e Socket/Socket.cpp
--- a/Socket/Socket.cpp	Tue Jun 03 08:53:07 2014 +0000
+++ b/Socket/Socket.cpp	Mon Jun 09 08:28:07 2014 +0000
@@ -134,10 +134,7 @@
     if( bind != 0 )
     {
         // set ip addr ( byte order )
-        req.local_addr[0] = ( (local_addr & 0xFF000000) >> 24 );
-        req.local_addr[1] = ( (local_addr & 0xFF0000) >> 16 );
-        req.local_addr[2] = ( (local_addr & 0xFF00) >> 8 );
-        req.local_addr[3] = (local_addr & 0xFF);
+        C_SNIC_UartMsgUtil::convertIntToByteAdday( local_addr, (char *)req.local_addr );
         req.local_port[0] = ( (port & 0xFF00) >> 8 );
         req.local_port[1] = (port & 0xFF);