diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-04-14 01:15:52 +0300 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-04-14 01:15:52 +0300 |
commit | 44ab5c3ef16d9e6babb2a344a26ff6f857eb4124 (patch) | |
tree | a4438da31f295bebb9b5e81d4225b4802870a334 | |
parent | fef0d9818a52c2e8331590a18a49cdd3fa64ae81 (diff) | |
download | micropython-44ab5c3ef16d9e6babb2a344a26ff6f857eb4124.tar.gz micropython-44ab5c3ef16d9e6babb2a344a26ff6f857eb4124.zip |
extmod/modlwip: Start adding debug output.
-rw-r--r-- | extmod/modlwip.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/extmod/modlwip.c b/extmod/modlwip.c index 441fd8cec9..73beeb0715 100644 --- a/extmod/modlwip.c +++ b/extmod/modlwip.c @@ -44,6 +44,12 @@ //#include "lwip/raw.h" #include "lwip/dns.h" +#if 0 // print debugging info +#define DEBUG_printf DEBUG_printf +#else // don't print debugging info +#define DEBUG_printf(...) (void)0 +#endif + // For compatibilily with older lwIP versions. #ifndef ip_set_option #define ip_set_option(pcb, opt) ((pcb)->so_options |= (opt)) @@ -318,6 +324,7 @@ STATIC err_t _lwip_tcp_recv(void *arg, struct tcp_pcb *tcpb, struct pbuf *p, err if (p == NULL) { // Other side has closed connection. + DEBUG_printf("_lwip_tcp_recv[%p]: other side closed connection\n", socket); socket->state = STATE_PEER_CLOSED; return ERR_OK; } else if (socket->incoming.pbuf != NULL) { |