diff --git a/lib/util/util.c b/lib/util/util.c index 11bb3151761..a01b47da15d 100644 --- a/lib/util/util.c +++ b/lib/util/util.c @@ -300,11 +300,29 @@ _PUBLIC_ bool fcntl_lock(int fd, int op, off_t offset, off_t count, int type) return true; } -void print_asc(int level, const uint8_t *buf,int len) +static void debugadd_cb(const char *buf, void *private_data) +{ + int *plevel = (int *)private_data; + DEBUGADD(*plevel, ("%s", buf)); +} + +void print_asc_cb(const uint8_t *buf, int len, + void (*cb)(const char *buf, void *private_data), + void *private_data) { int i; - for (i=0;i