diff options
| author | Daniel Campora | 2015-05-23 19:56:22 +0200 |
|---|---|---|
| committer | Daniel Campora | 2015-05-24 11:44:06 +0200 |
| commit | 9f8c5456befbf33cf8e02de99b6b9f5a417f006a (patch) | |
| tree | dc1339e90c801a2361dd19b0a3b4430a930a1ae5 /cc3200/mods | |
| parent | 0d31bbc7fa3bdf10a14d92bb010a5016dc6101af (diff) | |
cc3200: Reset the servers and close user sockets on WLAN disconection.
This is needed to avoid half-open connections.
Diffstat (limited to 'cc3200/mods')
| -rw-r--r-- | cc3200/mods/modusocket.c | 2 | ||||
| -rw-r--r-- | cc3200/mods/modwlan.c | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/cc3200/mods/modusocket.c b/cc3200/mods/modusocket.c index 68a3252c9..1a7cbe852 100644 --- a/cc3200/mods/modusocket.c +++ b/cc3200/mods/modusocket.c @@ -94,7 +94,6 @@ void modusocket_enter_sleep (void) { fd_set socketset; int16_t maxfd = 0; - sl_LockObjLock (&modusocket_LockObj, SL_OS_WAIT_FOREVER); for (int i = 0; i < MOD_NETWORK_MAX_SOCKETS; i++) { int16_t sd; if ((sd = modusocket_sockets[i].sd) >= 0) { @@ -105,7 +104,6 @@ void modusocket_enter_sleep (void) { // wait for any of the sockets to become ready... sl_Select(maxfd + 1, &socketset, NULL, NULL, NULL); - sl_LockObjUnlock (&modusocket_LockObj); } void modusocket_close_all_user_sockets (void) { diff --git a/cc3200/mods/modwlan.c b/cc3200/mods/modwlan.c index cdcd375e6..88dc06521 100644 --- a/cc3200/mods/modwlan.c +++ b/cc3200/mods/modwlan.c @@ -230,7 +230,7 @@ void SimpleLinkWlanEventHandler(SlWlanEvent_t *pWlanEvent) { { CLR_STATUS_BIT(wlan_obj.status, STATUS_BIT_CONNECTION); CLR_STATUS_BIT(wlan_obj.status, STATUS_BIT_IP_ACQUIRED); - // TODO reset the servers + servers_reset(); } break; case SL_WLAN_STA_CONNECTED_EVENT: @@ -245,7 +245,7 @@ void SimpleLinkWlanEventHandler(SlWlanEvent_t *pWlanEvent) { break; case SL_WLAN_STA_DISCONNECTED_EVENT: wlan_obj.staconnected = false; - // TODO reset the servers + servers_reset(); break; case SL_WLAN_P2P_DEV_FOUND_EVENT: // TODO |
