improve debug

This commit is contained in:
Wim Taymans 2020-04-21 15:51:55 +02:00
parent 539296069d
commit 48036f7d13
3 changed files with 31 additions and 19 deletions

View file

@ -34,8 +34,7 @@
#include <spa/pod/iter.h>
#include <spa/utils/result.h>
#include <spa/debug/pod.h>
#include <spa/debug/types.h>
#include "config.h"
@ -51,6 +50,12 @@
#include "modules/module-protocol-native/connection.h"
#include "modules/module-protocol-native/defs.h"
#undef spa_debug
#define spa_debug pw_log_debug
#include <spa/debug/pod.h>
#include <spa/debug/types.h>
#define NAME "protocol-native"
#ifndef UNIX_PATH_MAX
@ -130,7 +135,7 @@ struct client_data {
static void debug_msg(const char *prefix, const struct pw_protocol_native_message *msg, bool hex)
{
struct spa_pod *pod;
fprintf(stderr, "%s: id:%d op:%d size:%d seq:%d\n", prefix,
pw_log_debug("%s: id:%d op:%d size:%d seq:%d\n", prefix,
msg->id, msg->opcode, msg->size, msg->seq);
if ((pod = spa_pod_from_data(msg->data, msg->size, 0, msg->size)) != NULL)