diff --git a/net/iob/iob_dump.c b/net/iob/iob_dump.c index ee7cda4e3a..c9ffc7f4ab 100644 --- a/net/iob/iob_dump.c +++ b/net/iob/iob_dump.c @@ -54,22 +54,6 @@ # define MIN(a,b) ((a) < (b) ? (a) : (b)) #endif -/* Select the lowest level debug interface available */ - -#ifdef CONFIG_CPP_HAVE_VARARGS -# ifdef CONFIG_ARCH_LOWPUTC -# define message(format, ...) lowsyslog(format, ##__VA_ARGS__) -# else -# define message(format, ...) syslog(format, ##__VA_ARGS__) -# endif -#else -# ifdef CONFIG_ARCH_LOWPUTC -# define message lowsyslog -# else -# define message syslog -# endif -#endif - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -93,7 +77,7 @@ void iob_dump(FAR const char *msg, FAR struct iob_s *iob, unsigned int len, unsigned int cndx; head = iob; - message("%s: iob=%p pktlen=%d\n", msg, head, head->io_pktlen); + lowsyslog(LOG_DEBUG, "%s: iob=%p pktlen=%d\n", msg, head, head->io_pktlen); /* Check if the offset is beyond the data in the I/O buffer chain */ @@ -108,7 +92,8 @@ void iob_dump(FAR const char *msg, FAR struct iob_s *iob, unsigned int len, for (; iob; iob = iob->io_flink) { - message(" iob=%p len=%d offset=%d\n", iob, iob->io_len, iob->io_offset); + lowsyslog(LOG_DEBUG, " iob=%p len=%d offset=%d\n", + iob, iob->io_len, iob->io_offset); } /* Get the amount of data to be displayed, limited by the amount that we @@ -132,47 +117,47 @@ void iob_dump(FAR const char *msg, FAR struct iob_s *iob, unsigned int len, if (nbytes > 0) { - message(" %04x: ", offset); + lowsyslog(LOG_DEBUG, " %04x: ", offset); for (cndx = 0; cndx < 32; cndx++) { if (cndx == 16) { - message(" "); + lowsyslog(LOG_DEBUG, " "); } if ((lndx + cndx) < len) { - message("%02x", data[cndx]); + lowsyslog(LOG_DEBUG, "%02x", data[cndx]); } else { - message(" "); + lowsyslog(LOG_DEBUG, " "); } } - message(" "); + lowsyslog(LOG_DEBUG, " "); for (cndx = 0; cndx < 32; cndx++) { if (cndx == 16) { - message(" "); + lowsyslog(LOG_DEBUG, " "); } if ((lndx + cndx) < len) { if (data[cndx] >= 0x20 && data[cndx] < 0x7f) { - message("%c", data[cndx]); + lowsyslog(LOG_DEBUG, "%c", data[cndx]); } else { - message("."); + lowsyslog(LOG_DEBUG, "."); } } } - message("\n"); + lowsyslog(LOG_DEBUG, "\n"); } } } diff --git a/net/tcp/tcp_wrbuffer_dump.c b/net/tcp/tcp_wrbuffer_dump.c index 864e798091..741120f6fd 100644 --- a/net/tcp/tcp_wrbuffer_dump.c +++ b/net/tcp/tcp_wrbuffer_dump.c @@ -52,22 +52,6 @@ * Pre-processor definitions ****************************************************************************/ -/* Select the lowest level debug interface available */ - -#ifdef CONFIG_CPP_HAVE_VARARGS -# ifdef CONFIG_ARCH_LOWPUTC -# define message(format, ...) lowsyslog(format, ##__VA_ARGS__) -# else -# define message(format, ...) syslog(format, ##__VA_ARGS__) -# endif -#else -# ifdef CONFIG_ARCH_LOWPUTC -# define message lowsyslog -# else -# define message syslog -# endif -#endif - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -83,8 +67,8 @@ void tcp_wrbuffer_dump(FAR const char *msg, FAR struct tcp_wrbuffer_s *wrb, unsigned int len, unsigned int offset) { - message("%s: wrb=%p segno=%d sent=%d nrtx=%d\n", - msg, wrb, WRB_SEQNO(wrb), WRB_SENT(wrb), WRB_NRTX(wrb)); + lowsyslog(LOG_DEBUG, "%s: wrb=%p segno=%d sent=%d nrtx=%d\n", + msg, wrb, WRB_SEQNO(wrb), WRB_SENT(wrb), WRB_NRTX(wrb)); iob_dump("I/O Buffer Chain", WRB_IOB(wrb), len, offset); }