diff options
author | Daniel Campora <daniel@wipy.io> | 2015-05-22 19:53:33 +0200 |
---|---|---|
committer | Daniel Campora <daniel@wipy.io> | 2015-05-22 19:53:33 +0200 |
commit | ed56b0baba47e4d0697fdc2d81310a9a2c34c5df (patch) | |
tree | 260ea9aa95a23870487e8b0b24df9f7d41a86269 /cc3200/ftp/ftp.c | |
parent | 18030bd85d77367162162496ee025b7d98ad3c41 (diff) | |
download | micropython-ed56b0baba47e4d0697fdc2d81310a9a2c34c5df.tar.gz micropython-ed56b0baba47e4d0697fdc2d81310a9a2c34c5df.zip |
cc3200: Finally unlock the full wake on WLAN feature set.
Diffstat (limited to 'cc3200/ftp/ftp.c')
-rw-r--r-- | cc3200/ftp/ftp.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/cc3200/ftp/ftp.c b/cc3200/ftp/ftp.c index 3dc0923ce2..d812f563af 100644 --- a/cc3200/ftp/ftp.c +++ b/cc3200/ftp/ftp.c @@ -40,6 +40,7 @@ #include "ftp.h" #include "simplelink.h" #include "modwlan.h" +#include "modusocket.h" #include "debug.h" #include "serverstask.h" #include "ff.h" @@ -50,7 +51,6 @@ #include "updater.h" #include "timeutils.h" - /****************************************************************************** DEFINE PRIVATE CONSTANTS ******************************************************************************/ @@ -429,6 +429,9 @@ static bool ftp_create_listening_socket (_i16 *sd, _u16 port, _u8 backlog) { _sd = *sd; if (_sd > 0) { + // add the new socket to the network administration + modusocket_socket_add(_sd, false); + // Enable non-blocking mode nonBlockingOption.NonblockingEnabled = 1; ASSERT (sl_SetSockOpt(_sd, SOL_SOCKET, SL_SO_NONBLOCKING, &nonBlockingOption, sizeof(nonBlockingOption)) == SL_SOC_OK); @@ -464,6 +467,9 @@ static ftp_result_t ftp_wait_for_connection (_i16 l_sd, _i16 *n_sd) { return E_FTP_RESULT_FAILED; } + // add the new socket to the network administration + modusocket_socket_add(_sd, false); + // client connected, so go on return E_FTP_RESULT_OK; } |