- sr_dbg("DMM packet: %02x %02x %02x %02x %02x %02x %02x "
- "%02x %02x %02x %02x %02x %02x %02x %02x %02x "
- "%02x %02x %02x %02x %02x %02x %02x",
- buf[0], buf[1], buf[2], buf[3], buf[4], buf[5], buf[6],
- buf[7], buf[8], buf[9], buf[10], buf[11], buf[12], buf[13],
- buf[14], buf[15], buf[16], buf[17], buf[18], buf[19], buf[20],
- buf[21], buf[22]);
+ GString *text;
+
+ if (sr_log_loglevel_get() < SR_LOG_DBG)
+ return;
+
+ text = sr_hexdump_new(buf, len);
+ sr_dbg("DMM packet: %s", text->str);
+ sr_hexdump_free(text);