mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
protocol-native: print connection info after remap
Print the connection messages after mapping the ids or else we can't really make sense of the ids.
This commit is contained in:
parent
e2f01c5838
commit
944d205e8e
2 changed files with 9 additions and 5 deletions
|
|
@ -28,6 +28,7 @@
|
||||||
#include <sys/file.h>
|
#include <sys/file.h>
|
||||||
|
|
||||||
#include <spa/pod/iter.h>
|
#include <spa/pod/iter.h>
|
||||||
|
#include <spa/lib/debug.h>
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
|
|
@ -53,6 +54,8 @@
|
||||||
#define UNIX_PATH_MAX 108
|
#define UNIX_PATH_MAX 108
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
static bool debug_messages = 0;
|
||||||
|
|
||||||
#define LOCK_SUFFIX ".lock"
|
#define LOCK_SUFFIX ".lock"
|
||||||
#define LOCK_SUFFIXLEN 5
|
#define LOCK_SUFFIXLEN 5
|
||||||
|
|
||||||
|
|
@ -222,6 +225,10 @@ process_messages(struct client_data *data)
|
||||||
if (!pod_remap_data(SPA_POD_TYPE_STRUCT, message, size, &client->types))
|
if (!pod_remap_data(SPA_POD_TYPE_STRUCT, message, size, &client->types))
|
||||||
goto invalid_message;
|
goto invalid_message;
|
||||||
|
|
||||||
|
if (debug_messages) {
|
||||||
|
printf("<<<<<<<<< in: %d %d %d\n", id, opcode, size);
|
||||||
|
spa_debug_pod((struct spa_pod *)message, 0);
|
||||||
|
}
|
||||||
if (demarshal[opcode].func(resource, message, size) < 0)
|
if (demarshal[opcode].func(resource, message, size) < 0)
|
||||||
goto invalid_message;
|
goto invalid_message;
|
||||||
}
|
}
|
||||||
|
|
@ -885,6 +892,8 @@ static int module_init(struct pw_module *module, struct pw_properties *propertie
|
||||||
if (this == NULL)
|
if (this == NULL)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
debug_messages = pw_debug_is_category_enabled("connection");
|
||||||
|
|
||||||
this->implementation = &protocol_impl;
|
this->implementation = &protocol_impl;
|
||||||
this->extension = &protocol_ext_impl;
|
this->extension = &protocol_ext_impl;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -326,11 +326,6 @@ pw_protocol_native_connection_get_next(struct pw_protocol_native_connection *con
|
||||||
*dt = buf->data;
|
*dt = buf->data;
|
||||||
*sz = buf->size;
|
*sz = buf->size;
|
||||||
|
|
||||||
if (debug_messages) {
|
|
||||||
printf("<<<<<<<<< in: %d %d %zd\n", *dest_id, *opcode, len);
|
|
||||||
spa_debug_pod((struct spa_pod *)data, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue