diff --git a/net/LWIPInterface/LWIPInterface.cpp b/net/LWIPInterface/LWIPInterface.cpp index 2fd9c82a68..c37a52463a 100644 --- a/net/LWIPInterface/LWIPInterface.cpp +++ b/net/LWIPInterface/LWIPInterface.cpp @@ -169,6 +169,7 @@ int LWIPInterface::socket_open(void **handle, nsapi_protocol_t proto) udp_recv(s->udp, udp_recv_irq, s); *handle = s; + return 0; case NSAPI_TCP: s->proto = proto; @@ -180,6 +181,7 @@ int LWIPInterface::socket_open(void **handle, nsapi_protocol_t proto) tcp_arg(s->tcp, s); //tcp_err(s->tcp, tcp_error_irq); *handle = s; + return 0; } return NSAPI_ERROR_DEVICE_ERROR; @@ -193,6 +195,7 @@ int LWIPInterface::socket_close(void *handle) switch (s->proto) { case NSAPI_UDP: udp_disconnect(s->udp); + udp_remove(s->udp); break; case NSAPI_TCP: @@ -273,11 +276,6 @@ int LWIPInterface::socket_connect(void *handle, const SocketAddress &addr) return 0; } - -bool LWIPInterface::socket_is_connected(void *handle) -{ - return true; -} int LWIPInterface::socket_accept(void **handle, void *server) { diff --git a/net/LWIPInterface/LWIPInterface.h b/net/LWIPInterface/LWIPInterface.h index 41fdf0069f..139ab45548 100644 --- a/net/LWIPInterface/LWIPInterface.h +++ b/net/LWIPInterface/LWIPInterface.h @@ -85,12 +85,6 @@ protected: * @return 0 on success, negative on failure */ virtual int socket_connect(void *handle, const SocketAddress &address); - - /** Check if the socket is connected - * @param handle Socket handle - * @return true if connected, false otherwise - */ - virtual bool socket_is_connected(void *handle); /** Accept a new connection. * @param handle Handle in which to store new socket diff --git a/net/LWIPInterface/eth_arch.h b/net/LWIPInterface/eth_arch.h index 850d65e4ef..1ff54b1d38 100644 --- a/net/LWIPInterface/eth_arch.h +++ b/net/LWIPInterface/eth_arch.h @@ -1,4 +1,4 @@ -/* EthernetStack.h */ +/* EthernetInterface.h */ /* Copyright (C) 2012 mbed.org, MIT License * * Permission is hereby granted, free of charge, to any person obtaining a copy of this software