Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of PicoTCP by
Diff: Socket/pico_bsd_layer.cpp
- Revision:
- 14:fe225a6f92c0
- Parent:
- 13:c6662adea07d
- Child:
- 15:129f20ca4d7d
- Child:
- 16:6893f625e337
diff -r c6662adea07d -r fe225a6f92c0 Socket/pico_bsd_layer.cpp
--- a/Socket/pico_bsd_layer.cpp Thu Jun 06 09:14:40 2013 +0000
+++ b/Socket/pico_bsd_layer.cpp Thu Jun 06 09:27:28 2013 +0000
@@ -136,17 +136,17 @@
}
else
{
- //printf("Unexpected event\n");
+ printf("Unexpected event\n");
// give semaphore back when -1 occurs or close requested
if( (ev & PICO_SOCK_EV_ERR) || (ev & PICO_SOCK_EV_CLOSE) || (ev & PICO_SOCK_EV_FIN) )
{
- //printf("Exception\n");
+ printf("Exception\n");
_sock->state = SOCK_CLOSED;
- if(_sock->sock)
+ if(_sock->state != SOCK_CLOSED)
{
pico_socket_close(_sock->sock);
- _sock->sock = NULL;
+ //_sock->sock = NULL;
}
_sock->mutex->unlock();
globalLock.lock();
