Skip to content

Commit 81d302b

Browse files
committed
zephyr/modusocket: Call net_nbuf_print_frags() in recv callback if DEBUG > 1.
1 parent e31fbd9 commit 81d302b

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

zephyr/modusocket.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@
3636
#include <net/net_context.h>
3737
#include <net/nbuf.h>
3838

39-
#if 0 // print debugging info
39+
#define DEBUG 0
40+
#if DEBUG // print debugging info
4041
#define DEBUG_printf printf
4142
#else // don't print debugging info
4243
#define DEBUG_printf(...) (void)0
@@ -144,6 +145,9 @@ static void sock_received_cb(struct net_context *context, struct net_buf *net_bu
144145
DEBUG_printf(" (sz=%d, l=%d), token: %p", net_buf->size, net_buf->len, net_nbuf_token(net_buf));
145146
}
146147
DEBUG_printf("\n");
148+
#if DEBUG > 1
149+
net_nbuf_print_frags(net_buf);
150+
#endif
147151

148152
// if net_buf == NULL, EOF
149153
if (net_buf == NULL) {

0 commit comments

Comments
 (0)