mbed-os/features
Bogdan Marinescu acc5f68b9f Don't send events on close()
It's currently possible to generate a socket event when a non-blocking socket is closed:

1. _pending is set to 0 in https://github.com/ARMmbed/mbed-os/blob/master/features/netsocket/TCPSocket.cpp#L22
   when the socket is created.
2. close() calls event() in https://github.com/ARMmbed/mbed-os/blob/master/features/netsocket/Socket.cpp#L66
3. event() increments _pending, and since _pending is 1 it will call _callback() in https://github.com/ARMmbed/mbed-os/blob/master/features/netsocket/TCPSocket.cpp#L167

However, if send() (for example) is called, this can happen:

- send() is called and sets _pending to 0.
- when the data is sent, event() is called, which sets _pending to 1 and calls _callback().
- if close() is called at this point, there won't be an event generated for close() anymore,
  since _pending will be set to 2.

Same thing for recv. Also, same thing for TCPServer and UDPSocket.

This PR changes the initial value of _pending to 1 instead of 0, so that
events are never generated for close().
2016-12-08 10:48:54 +00:00
..
FEATURE_BLE Fix documentation of function allocateLongWriteRequest. 2016-11-15 13:25:10 +00:00
FEATURE_COMMON_PAL Rename timeout.c to not collide with Timeout.cpp 2016-12-02 16:09:25 +00:00
FEATURE_LWIP Added clearing of ipv6 addresses to lwip bringdown function 2016-12-02 16:09:27 +00:00
FEATURE_UVISOR uVisor: Update to v0.26.1 2016-11-22 17:24:05 +00:00
frameworks added static specifer in green_metrics.cpp 2016-11-19 08:17:05 +09:00
mbedtls Apply new naming convention to mbed TLS macros 2016-11-18 15:01:01 +00:00
nanostack Return localhost from NanostackInterface::get_ip_address() 2016-11-16 19:07:23 +02:00
netsocket Don't send events on close() 2016-12-08 10:48:54 +00:00
storage/FEATURE_STORAGE CFSTORE issue 3327: fix to build CFSTORE SRAM mode (disabling flash storage). 2016-12-02 16:09:24 +00:00
unsupported Merge pull request #3238 from LMESTM/dev_i2c_stm32f4hal 2016-11-16 17:42:12 +00:00