mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
protocol-native: send debug to right topic
This commit is contained in:
parent
95127d8a18
commit
8115bf3eeb
1 changed files with 10 additions and 2 deletions
|
|
@ -262,16 +262,24 @@ struct client_data {
|
||||||
static void debug_msg(const char *prefix, const struct pw_protocol_native_message *msg, bool hex)
|
static void debug_msg(const char *prefix, const struct pw_protocol_native_message *msg, bool hex)
|
||||||
{
|
{
|
||||||
struct spa_pod *pod;
|
struct spa_pod *pod;
|
||||||
|
struct spa_debug_log_ctx c;
|
||||||
|
|
||||||
|
if (!pw_log_topic_custom_enabled(SPA_LOG_LEVEL_DEBUG, mod_topic_connection))
|
||||||
|
return;
|
||||||
|
|
||||||
|
c = SPA_LOGT_DEBUG_INIT(pw_log_get(),
|
||||||
|
SPA_LOG_LEVEL_DEBUG, mod_topic_connection);
|
||||||
|
|
||||||
pw_logt_debug(mod_topic_connection,
|
pw_logt_debug(mod_topic_connection,
|
||||||
"%s: id:%d op:%d size:%d seq:%d fds:%d", prefix,
|
"%s: id:%d op:%d size:%d seq:%d fds:%d", prefix,
|
||||||
msg->id, msg->opcode, msg->size, msg->seq, msg->n_fds);
|
msg->id, msg->opcode, msg->size, msg->seq, msg->n_fds);
|
||||||
|
|
||||||
if ((pod = get_first_pod_from_data(msg->data, msg->size, 0)) != NULL)
|
if ((pod = get_first_pod_from_data(msg->data, msg->size, 0)) != NULL)
|
||||||
spa_debug_pod(0, NULL, pod);
|
spa_debugc_pod(&c.ctx, 0, NULL, pod);
|
||||||
else
|
else
|
||||||
hex = true;
|
hex = true;
|
||||||
if (hex)
|
if (hex)
|
||||||
spa_debug_log_mem(pw_log_get(), SPA_LOG_LEVEL_DEBUG, 0, msg->data, msg->size);
|
spa_debugc_mem(&c.ctx, 0, msg->data, msg->size);
|
||||||
|
|
||||||
pw_logt_debug(mod_topic_connection, "%s ****", prefix);
|
pw_logt_debug(mod_topic_connection, "%s ****", prefix);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue