diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2017-04-11 15:24:33 +0300 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2017-04-11 15:25:42 +0300 |
commit | 81d302b8f8a9a6b1c3547b4d00fc938e4ff730b5 (patch) | |
tree | d85d67f69b38dc94c79502426d84f4bdafa49e4d | |
parent | e31fbd9b41315963aaca732e7585fc4cb10ccbcd (diff) | |
download | micropython-81d302b8f8a9a6b1c3547b4d00fc938e4ff730b5.tar.gz micropython-81d302b8f8a9a6b1c3547b4d00fc938e4ff730b5.zip |
zephyr/modusocket: Call net_nbuf_print_frags() in recv callback if DEBUG > 1.
-rw-r--r-- | zephyr/modusocket.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/zephyr/modusocket.c b/zephyr/modusocket.c index 36ccdbc3b7..0eb6e9dac5 100644 --- a/zephyr/modusocket.c +++ b/zephyr/modusocket.c @@ -36,7 +36,8 @@ #include <net/net_context.h> #include <net/nbuf.h> -#if 0 // print debugging info +#define DEBUG 0 +#if DEBUG // print debugging info #define DEBUG_printf printf #else // don't print debugging info #define DEBUG_printf(...) (void)0 @@ -144,6 +145,9 @@ static void sock_received_cb(struct net_context *context, struct net_buf *net_bu DEBUG_printf(" (sz=%d, l=%d), token: %p", net_buf->size, net_buf->len, net_nbuf_token(net_buf)); } DEBUG_printf("\n"); + #if DEBUG > 1 + net_nbuf_print_frags(net_buf); + #endif // if net_buf == NULL, EOF if (net_buf == NULL) { |