Ethernet interface for W5500 with bug fixed in socket::close()
Fork of EthernetInterfaceW5500 by
Diff: Socket/Socket.cpp
- Revision:
- 15:fe68ac753657
- Parent:
- 10:cadac6bcd169
diff -r a089e591e530 -r fe68ac753657 Socket/Socket.cpp --- a/Socket/Socket.cpp Tue Aug 19 23:32:48 2014 +0000 +++ b/Socket/Socket.cpp Fri Aug 29 12:00:38 2014 +0000 @@ -35,8 +35,10 @@ int Socket::close() { // add this code refer from EthernetInterface. + int res; + res = eth->close(_sock_fd); _sock_fd = -1; - return (eth->close(_sock_fd)) ? 0 : -1; + return (res)? 0: -1; } Socket::~Socket()