Skip to content
Snippets Groups Projects
Commit 9ca342f8 authored by George Kiagiadakis's avatar George Kiagiadakis
Browse files

debug: update all library code to use the new debug system

+ enable the new log writer on the executables
+ enable structured logging in the tests
parent 5bf40e86
No related branches found
No related tags found
No related merge requests found
......@@ -84,6 +84,8 @@
* "default-value": the default value
*/
#define G_LOG_DOMAIN "wp-base-endpoint"
#include "base-endpoint.h"
#include "error.h"
#include "factory.h"
......
......@@ -12,7 +12,10 @@
* The #WpConfiguration class manages configuration files and parsers
*/
#define G_LOG_DOMAIN "wp-configuration"
#include "configuration.h"
#include "debug.h"
#include "private.h"
struct _WpConfiguration
......@@ -284,7 +287,8 @@ wp_configuration_reload (WpConfiguration *self, const char *extension)
/* Get the parser for the extension */
WpConfigParser *parser = g_hash_table_lookup (self->parsers, extension);
if (!parser) {
g_warning ("Could not find parser for extension '%s'", extension);
wp_warning_object (self, "Could not find parser for extension '%s'",
extension);
return;
}
......@@ -299,7 +303,7 @@ wp_configuration_reload (WpConfiguration *self, const char *extension)
/* Open the directory */
conf_dir = g_dir_open (path, 0, &error);
if (!conf_dir) {
g_warning ("Could not open configuration path '%s'", path);
wp_warning_object (self, "Could not open configuration path '%s'", path);
continue;
}
......@@ -310,10 +314,10 @@ wp_configuration_reload (WpConfiguration *self, const char *extension)
if (g_str_has_suffix (file_name, ext)) {
location = g_build_filename (path, file_name, NULL);
g_debug ("loading config file: %s", location);
wp_debug_object (self, "loading config file: %s", location);
if (!wp_config_parser_add_file (parser, location))
g_warning ("Failed to parse file '%s'", location);
wp_warning_object (self, "Failed to parse file '%s'", location);
}
}
......
......@@ -24,6 +24,8 @@
* the #WpObjectManager API.
*/
#define G_LOG_DOMAIN "wp-core"
#include "core.h"
#include "wp.h"
#include "private.h"
......@@ -56,7 +58,8 @@ wp_loop_source_dispatch (GSource * s, GSourceFunc callback, gpointer user_data)
pw_loop_leave (WP_LOOP_SOURCE(s)->loop);
if (G_UNLIKELY (result < 0))
g_warning ("pw_loop_iterate failed: %s", spa_strerror (result));
wp_warning_boxed (G_TYPE_SOURCE, s,
"pw_loop_iterate failed: %s", spa_strerror (result));
return G_SOURCE_CONTINUE;
}
......@@ -216,7 +219,7 @@ wp_core_finalize (GObject * obj)
g_clear_pointer (&self->context, g_main_context_unref);
g_clear_pointer (&self->async_tasks, g_hash_table_unref);
g_debug ("WpCore destroyed");
wp_debug_object (self, "WpCore destroyed");
G_OBJECT_CLASS (wp_core_parent_class)->finalize (obj);
}
......
......@@ -39,9 +39,9 @@ void wp_log_structured_standard (const gchar *log_domain,
G_STRINGIFY (__LINE__), G_STRFUNC, type, object, __VA_ARGS__); \
})
#define wp_warn(...) \
#define wp_warning(...) \
wp_log (G_LOG_LEVEL_WARNING, 0, NULL, __VA_ARGS__)
#define wp_msg(...) \
#define wp_message(...) \
wp_log (G_LOG_LEVEL_MESSAGE, 0, NULL, __VA_ARGS__)
#define wp_info(...) \
wp_log (G_LOG_LEVEL_INFO, 0, NULL, __VA_ARGS__)
......@@ -50,9 +50,9 @@ void wp_log_structured_standard (const gchar *log_domain,
#define wp_trace(...) \
wp_log (WP_LOG_LEVEL_TRACE, 0, NULL, __VA_ARGS__)
#define wp_warn_object(object, ...) \
#define wp_warning_object(object, ...) \
wp_log (G_LOG_LEVEL_WARNING, G_TYPE_FROM_INSTANCE (object), object, __VA_ARGS__)
#define wp_msg_object(object, ...) \
#define wp_message_object(object, ...) \
wp_log (G_LOG_LEVEL_MESSAGE, G_TYPE_FROM_INSTANCE (object), object, __VA_ARGS__)
#define wp_info_object(object, ...) \
wp_log (G_LOG_LEVEL_INFO, G_TYPE_FROM_INSTANCE (object), object, __VA_ARGS__)
......@@ -61,9 +61,9 @@ void wp_log_structured_standard (const gchar *log_domain,
#define wp_trace_object(object, ...) \
wp_log (WP_LOG_LEVEL_TRACE, G_TYPE_FROM_INSTANCE (object), object, __VA_ARGS__)
#define wp_warn_boxed(type, object, ...) \
#define wp_warning_boxed(type, object, ...) \
wp_log (G_LOG_LEVEL_WARNING, type, object, __VA_ARGS__)
#define wp_msg_boxed(type, object, ...) \
#define wp_message_boxed(type, object, ...) \
wp_log (G_LOG_LEVEL_MESSAGE, type, object, __VA_ARGS__)
#define wp_info_boxed(type, object, ...) \
wp_log (G_LOG_LEVEL_INFO, type, object, __VA_ARGS__)
......
......@@ -24,7 +24,10 @@
* actual nodes that the `spa_device` requests to create.
*/
#define G_LOG_DOMAIN "wp-device"
#include "device.h"
#include "debug.h"
#include "node.h"
#include "error.h"
#include "private.h"
......@@ -183,8 +186,9 @@ wp_device_new_from_factory (WpCore * core,
WpDevice *self = NULL;
struct pw_core *pw_core = wp_core_get_pw_core (core);
if (!pw_core) {
g_warning ("The WirePlumber core is not connected; device cannot be created");
if (G_UNLIKELY (!pw_core)) {
g_critical ("The WirePlumber core is not connected; "
"device cannot be created");
return NULL;
}
......@@ -453,8 +457,8 @@ wp_spa_device_new_from_spa_factory (WpCore * core,
self->handle = pw_context_load_spa_handle (pw_context,
factory_name, props ? wp_properties_peek_dict (props) : NULL);
if (!self->handle) {
g_warning ("SPA handle '%s' could not be loaded; is it installed?",
factory_name);
wp_warning_object (self, "SPA handle '%s' could not be loaded; "
"is it installed?", factory_name);
return NULL;
}
......@@ -462,7 +466,8 @@ wp_spa_device_new_from_spa_factory (WpCore * core,
res = spa_handle_get_interface (self->handle, SPA_TYPE_INTERFACE_Device,
(gpointer *) &self->interface);
if (res < 0) {
g_warning ("Could not get device interface from SPA handle: %s",
wp_warning_object (self,
"Could not get device interface from SPA handle: %s",
spa_strerror (res));
return NULL;
}
......
......@@ -18,7 +18,10 @@
* #WpObjectManager API.
*/
#define G_LOG_DOMAIN "wp-endpoint-link"
#include "endpoint-link.h"
#include "debug.h"
#include "private.h"
#include "error.h"
#include "wpenums.h"
......@@ -362,7 +365,7 @@ on_item_activated (WpSessionItem * item, GAsyncResult * res, gpointer data)
g_autoptr (GError) error = NULL;
if (!wp_session_item_activate_finish (item, res, &error)) {
g_debug ("failed to activate link: %s", error->message);
wp_message_object (self, "failed to activate link: %s", error->message);
self->info.error = g_strdup (error->message);
/* on_si_link_flags_changed() will be called right after we return,
taking care of the rest... */
......
......@@ -18,6 +18,8 @@
* API.
*/
#define G_LOG_DOMAIN "wp-endpoint-stream"
#include "endpoint-stream.h"
#include "private.h"
#include "error.h"
......
......@@ -17,7 +17,10 @@
* PipeWire registry and it is made available through the #WpObjectManager API.
*/
#define G_LOG_DOMAIN "wp-endpoint"
#include "endpoint.h"
#include "debug.h"
#include "session.h"
#include "private.h"
#include "error.h"
......@@ -772,10 +775,11 @@ destroy_deconfigured_link (WpSessionItem * link, WpSiFlags flags, gpointer data)
static void
on_si_link_exported (WpSessionItem * link, GAsyncResult * res, gpointer data)
{
WpImplEndpoint *self = WP_IMPL_ENDPOINT (data);
g_autoptr (GError) error = NULL;
if (!wp_session_item_export_finish (link, res, &error)) {
g_warning ("failed to export link: %s", error->message);
wp_warning_object (self, "failed to export link: %s", error->message);
g_object_unref (link);
return;
}
......@@ -797,10 +801,7 @@ impl_create_link (void *object, const struct spa_dict *props)
/* find the session */
session = wp_session_item_get_associated_proxy (
WP_SESSION_ITEM (self->item), WP_TYPE_SESSION);
if (!session) {
g_warning ("could not find session");
return -ENAVAIL;
}
g_return_val_if_fail (!session, -ENAVAIL);
if (self->info.direction == PW_DIRECTION_OUTPUT) {
self_ep = spa_dict_lookup (props, PW_KEY_ENDPOINT_LINK_OUTPUT_ENDPOINT);
......@@ -816,12 +817,14 @@ impl_create_link (void *object, const struct spa_dict *props)
/* verify arguments */
if (!peer_ep) {
g_debug ("a peer endpoint must be specified at the very least");
wp_warning_object (self,
"a peer endpoint must be specified at the very least");
return -EINVAL;
}
if (self_ep && ((guint32) atoi (self_ep))
!= wp_proxy_get_bound_id (WP_PROXY (self))) {
g_debug ("creating links for other endpoints is now allowed");
wp_warning_object (self,
"creating links for other endpoints is now allowed");
return -EACCES;
}
......@@ -851,7 +854,8 @@ impl_create_link (void *object, const struct spa_dict *props)
}
if (!self_si_stream) {
g_debug ("stream %d not found in %d", self_stream_id, self_ep_id);
wp_warning_object (self, "stream %d not found in %d", self_stream_id,
self_ep_id);
return -EINVAL;
}
......@@ -862,7 +866,7 @@ impl_create_link (void *object, const struct spa_dict *props)
peer_ep_proxy = wp_session_get_endpoint (session, peer_ep_id);
if (!peer_ep_proxy) {
g_debug ("endpoint %d not found in session", peer_ep_id);
wp_warning_object (self, "endpoint %d not found in session", peer_ep_id);
return -EINVAL;
}
......@@ -875,7 +879,8 @@ impl_create_link (void *object, const struct spa_dict *props)
}
if (!peer_stream_proxy) {
g_debug ("stream %d not found in %d", peer_stream_id, peer_ep_id);
wp_warning_object (self, "stream %d not found in %d", peer_stream_id,
peer_ep_id);
return -EINVAL;
}
......@@ -900,7 +905,7 @@ impl_create_link (void *object, const struct spa_dict *props)
core = wp_proxy_get_core (WP_PROXY (self));
link = wp_session_item_make (core, "si-standard-link");
if (!link) {
g_debug ("si-standard-link factory is not available");
wp_warning_object (self, "si-standard-link factory is not available");
return -ENAVAIL;
}
......@@ -917,8 +922,8 @@ impl_create_link (void *object, const struct spa_dict *props)
g_variant_new_uint64 (out_stream_i));
g_variant_builder_add (&b, "{sv}", "in-stream",
g_variant_new_uint64 (in_stream_i));
if (!wp_session_item_configure (link, g_variant_builder_end (&b))) {
g_debug ("si-standard-link configuration failed");
if (G_UNLIKELY (!wp_session_item_configure (link, g_variant_builder_end (&b)))) {
g_critical ("si-standard-link configuration failed");
return -ENAVAIL;
}
......
......@@ -13,7 +13,10 @@
* objects with a well-known name that is registered on the #WpCore
*/
#define G_LOG_DOMAIN "wp-factory"
#include "factory.h"
#include "debug.h"
#include "private.h"
struct _WpFactory
......@@ -38,7 +41,7 @@ wp_factory_finalize (GObject * obj)
{
WpFactory * self = WP_FACTORY (obj);
g_debug ("WpFactory:%p destroying factory: %s", self, self->name);
wp_trace_object (self, "destroying factory: %s", self->name);
g_weak_ref_clear (&self->core);
g_free (self->name);
......@@ -77,7 +80,7 @@ wp_factory_new (WpCore * core, const gchar * name, WpFactoryFunc func)
f->name_quark = g_quark_from_string (f->name);
f->create_object = func;
g_info ("WpFactory:%p new factory: %s", f, name);
wp_debug_object (f, "new factory: %s", name);
wp_registry_register_object (wp_core_get_registry (core), f);
......@@ -123,7 +126,7 @@ void
wp_factory_create_object (WpFactory * self, GType type,
GVariant * properties, GAsyncReadyCallback ready, gpointer user_data)
{
g_debug ("WpFactory:%p (%s) create object of type %s", self, self->name,
wp_debug_object (self, "(%s) create object of type %s", self->name,
g_type_name (type));
self->create_object (self, type, properties, ready, user_data);
......
......@@ -6,6 +6,8 @@
* SPDX-License-Identifier: MIT
*/
#define G_LOG_DOMAIN "wp-iterator"
#include "private.h"
#include "iterator.h"
......
......@@ -19,6 +19,8 @@
* on the remote PipeWire server by calling into a factory.
*/
#define G_LOG_DOMAIN "wp-link"
#include "link.h"
#include "private.h"
......@@ -133,8 +135,8 @@ wp_link_new_from_factory (WpCore * core,
WpLink *self = NULL;
struct pw_core *pw_core = wp_core_get_pw_core (core);
if (!pw_core) {
g_warning ("The WirePlumber core is not connected; link cannot be created");
if (G_UNLIKELY (!pw_core)) {
g_critical ("The WirePlumber core is not connected; link cannot be created");
return NULL;
}
......
......@@ -81,7 +81,6 @@ wp_lib = library('wireplumber-' + wireplumber_api_version,
c_args : [
'-D_GNU_SOURCE',
'-DG_LOG_USE_STRUCTURED',
'-DG_LOG_DOMAIN="libwireplumber"',
'-DWIREPLUMBER_DEFAULT_MODULE_DIR="@0@"'.format(wireplumber_module_dir),
'-DBUILDING_WP',
],
......
......@@ -39,7 +39,10 @@
* resources that the module has allocated.
*/
#define G_LOG_DOMAIN "wp-module"
#include "module.h"
#include "debug.h"
#include "error.h"
#include "private.h"
#include <gmodule.h>
......@@ -70,7 +73,7 @@ wp_module_finalize (GObject * object)
{
WpModule *self = WP_MODULE (object);
g_debug ("WpModule:%p unloading module", self);
wp_trace_object (self, "unloading module");
if (self->destroy)
self->destroy (self->destroy_data);
......@@ -161,7 +164,7 @@ wp_module_load (WpCore * core, const gchar * abi, const gchar * module_name,
module = g_object_new (WP_TYPE_MODULE, NULL);
g_weak_ref_init (&module->core, core);
g_info ("WpModule:%p loading module %s (ABI: %s)", module, module_name, abi);
wp_debug_object (module, "loading module %s (ABI: %s)", module_name, abi);
if (!g_strcmp0 (abi, "C")) {
if (!wp_module_load_c (module, core, module_name, args, error))
......
......@@ -25,7 +25,10 @@
* proxy to a remote object.
*/
#define G_LOG_DOMAIN "wp-node"
#include "node.h"
#include "debug.h"
#include "error.h"
#include "private.h"
......@@ -189,8 +192,8 @@ wp_node_new_from_factory (WpCore * core,
WpNode *self = NULL;
struct pw_core *pw_core = wp_core_get_pw_core (core);
if (!pw_core) {
g_warning ("The WirePlumber core is not connected; node cannot be created");
if (G_UNLIKELY (!pw_core)) {
g_critical ("The WirePlumber core is not connected; node cannot be created");
return NULL;
}
......@@ -358,7 +361,7 @@ wp_impl_node_new_from_pw_factory (WpCore * core,
factory = pw_context_find_factory (pw_context, factory_name);
if (!factory) {
g_warning ("pipewire factory '%s' not found", factory_name);
wp_warning ("pipewire factory '%s' not found", factory_name);
return NULL;
}
......@@ -366,7 +369,7 @@ wp_impl_node_new_from_pw_factory (WpCore * core,
NULL, PW_TYPE_INTERFACE_Node, PW_VERSION_NODE,
props ? wp_properties_to_pw_properties (props) : NULL, 0);
if (!node) {
g_warning ("failed to create node from factory '%s'", factory_name);
wp_warning ("failed to create node from factory '%s'", factory_name);
return NULL;
}
......
......@@ -37,7 +37,10 @@
* #WpObjectManager::object-added signal will be emitted for all of them.
*/
#define G_LOG_DOMAIN "wp-object-manager"
#include "object-manager.h"
#include "debug.h"
#include "private.h"
#include <pipewire/pipewire.h>
......@@ -339,7 +342,7 @@ check_constraints (GVariant *constraints,
GVariantDict dict = G_VARIANT_DICT_INIT (c);
if (!g_variant_dict_lookup (&dict, "type", "i", &ctype)) {
g_warning ("Invalid object manager constraint without a type");
g_critical ("Invalid object manager constraint without a type");
goto error;
}
......@@ -349,11 +352,11 @@ check_constraints (GVariant *constraints,
goto next;
if (!g_variant_dict_lookup (&dict, "name", "&s", &prop_name)) {
g_warning ("property constraint is without a property name");
g_critical ("property constraint is without a property name");
goto error;
}
if (!g_variant_dict_lookup (&dict, "value", "&s", &prop_value)) {
g_warning ("property constraint is without a property value");
g_critical ("property constraint is without a property value");
goto error;
}
if (!g_strcmp0 (wp_properties_get (global_props, prop_name), prop_value))
......@@ -365,11 +368,11 @@ check_constraints (GVariant *constraints,
goto next;
if (!g_variant_dict_lookup (&dict, "name", "&s", &prop_name)) {
g_warning ("property constraint is without a property name");
g_critical ("property constraint is without a property name");
goto error;
}
if (!g_variant_dict_lookup (&dict, "value", "&s", &prop_value)) {
g_warning ("property constraint is without a property value");
g_critical ("property constraint is without a property value");
goto error;
}
if (!g_strcmp0 (wp_properties_get (props, prop_name), prop_value))
......@@ -381,11 +384,11 @@ check_constraints (GVariant *constraints,
goto next;
if (!g_variant_dict_lookup (&dict, "name", "&s", &prop_name)) {
g_warning ("property constraint is without a property name");
g_critical ("property constraint is without a property name");
goto error;
}
if (!g_variant_dict_lookup (&dict, "value", "&s", &prop_value)) {
g_warning ("property constraint is without a property value");
g_critical ("property constraint is without a property value");
goto error;
}
......@@ -406,7 +409,7 @@ check_constraints (GVariant *constraints,
break;
default:
g_warning ("Unknown constraint type '%d'", ctype);
g_critical ("Unknown constraint type '%d'", ctype);
goto error;
}
......@@ -425,7 +428,7 @@ check_constraints (GVariant *constraints,
error:
{
g_autofree gchar *dbgstr = g_variant_print (c, TRUE);
g_warning ("offending constraint was: %s", dbgstr);
g_critical ("offending constraint was: %s", dbgstr);
goto next;
}
}
......@@ -500,14 +503,14 @@ on_proxy_ready (GObject * proxy, GAsyncResult * res, gpointer data)
g_autoptr (WpObjectManager) self = WP_OBJECT_MANAGER (data);
g_autoptr (GError) error = NULL;
if (wp_proxy_augment_finish (WP_PROXY (proxy), res, &error)) {
g_ptr_array_add (self->objects, proxy);
g_signal_emit (self, signals[SIGNAL_OBJECT_ADDED], 0, proxy);
schedule_emit_objects_changed (self);
} else {
g_message ("WpObjectManager:%p proxy augment failed: %s", self,
error->message);
if (!wp_proxy_augment_finish (WP_PROXY (proxy), res, &error)) {
wp_message_object (self, "proxy augment failed: %s", error->message);
return;
}
g_ptr_array_add (self->objects, proxy);
g_signal_emit (self, signals[SIGNAL_OBJECT_ADDED], 0, proxy);
schedule_emit_objects_changed (self);
}
static void
......@@ -601,6 +604,9 @@ wp_object_manager_rm_object (WpObjectManager * self, gpointer object)
* as the WpCore is alive.
*/
#undef G_LOG_DOMAIN
#define G_LOG_DOMAIN "wp-registry"
static void
wp_registry_notify_add_object (WpRegistry *self, gpointer object)
{
......@@ -658,7 +664,8 @@ registry_global (void *data, uint32_t id, uint32_t permissions,
WpRegistry *self = data;
GType gtype = find_proxy_instance_type (type, version);
g_debug ("registry global:%u perm:0x%x type:%s/%u -> %s",
wp_debug_object (wp_registry_get_core (self),
"global:%u perm:0x%x type:%s/%u -> %s",
id, permissions, type, version, g_type_name (gtype));
wp_registry_prepare_new_global (self, id, permissions,
......@@ -689,7 +696,8 @@ registry_global_remove (void *data, uint32_t id)
g_return_if_fail (global &&
global->flags & WP_GLOBAL_FLAG_APPEARS_ON_REGISTRY);
g_debug ("registry global removed:%u type:%s", id, g_type_name (global->type));
wp_debug_object (wp_registry_get_core (self),
"global removed:%u type:%s", id, g_type_name (global->type));
wp_global_rm_flag (global, WP_GLOBAL_FLAG_APPEARS_ON_REGISTRY);
}
......@@ -802,7 +810,7 @@ expose_tmp_globals (WpCore *core, GAsyncResult *res, WpRegistry *self)
g_autoptr (GPtrArray) tmp_globals = NULL;
if (!wp_core_sync_finish (core, res, &error))
g_warning ("core sync error: %s", error->message);
wp_warning_object (core, "core sync error: %s", error->message);
/* in case the registry was cleared in the meantime... */
if (G_UNLIKELY (!self->tmp_globals))
......@@ -813,7 +821,7 @@ expose_tmp_globals (WpCore *core, GAsyncResult *res, WpRegistry *self)
self->tmp_globals =
g_ptr_array_new_with_free_func ((GDestroyNotify) wp_global_unref);
g_debug ("exposing %u new globals", tmp_globals->len);
wp_debug_object (core, "exposing %u new globals", tmp_globals->len);
/* traverse in the order that the globals appeared on the registry */
for (guint i = 0; i < tmp_globals->len; i++) {
......@@ -870,7 +878,7 @@ wp_registry_prepare_new_global (WpRegistry * self, guint32 id,
}
}
g_debug ("%s WpGlobal:%u type:%s proxy:%p",
wp_debug_object (core, "%s WpGlobal:%u type:%s proxy:%p",
global ? "reuse" : "new", id, g_type_name (type),
(global && global->proxy) ? global->proxy : proxy);
......
......@@ -10,9 +10,12 @@
* SECTION: WpPolicy
*/
#define G_LOG_DOMAIN "wp-policy"
#include <pipewire/pipewire.h>
#include "policy.h"
#include "debug.h"
#include "private.h"
/* WpPolicyManager */
......@@ -46,7 +49,7 @@ wp_policy_manager_finalize (GObject *object)
{
WpPolicyManager *self = WP_POLICY_MANAGER (object);
g_debug ("WpPolicyManager destroyed");
wp_trace_object (self, "destroyed");
g_clear_object (&self->sessions_om);
g_clear_object (&self->endpoints_om);
......@@ -417,8 +420,8 @@ wp_policy_unregister (WpPolicy *self)
mgr = wp_registry_find_object (wp_core_get_registry (core),
(GEqualFunc) WP_IS_POLICY_MANAGER, NULL);
if (G_UNLIKELY (!mgr)) {
g_critical ("WpPolicy:%p seems registered, but the policy manager "
"is absent", self);
g_critical (WP_OBJECT_FORMAT " seems registered, but the policy manager "
"is absent", WP_OBJECT_ARGS (self));
return;
}
......@@ -444,8 +447,8 @@ wp_policy_notify_changed (WpPolicy *self)
mgr = wp_registry_find_object (wp_core_get_registry (core),
(GEqualFunc) WP_IS_POLICY_MANAGER, NULL);
if (G_UNLIKELY (!mgr)) {
g_critical ("WpPolicy:%p seems registered, but the policy manager "
"is absent", self);
g_critical (WP_OBJECT_FORMAT " seems registered, but the policy manager "
"is absent", WP_OBJECT_ARGS (self));
return;
}
......
......@@ -16,6 +16,8 @@
* PipeWire registry and it is made available through the #WpObjectManager API.
*/
#define G_LOG_DOMAIN "wp-port"
#include "port.h"
#include "private.h"
......
......@@ -58,11 +58,11 @@ gpointer wp_registry_find_object (WpRegistry *reg, GEqualFunc func,
void wp_registry_register_object (WpRegistry *reg, gpointer obj);
void wp_registry_remove_object (WpRegistry *reg, gpointer obj);
WpCore * wp_registry_get_core (WpRegistry * self);
WpCore * wp_registry_get_core (WpRegistry * self) G_GNUC_CONST;
/* core */
WpRegistry * wp_core_get_registry (WpCore * self);
WpRegistry * wp_core_get_registry (WpCore * self) G_GNUC_CONST;
/* global */
......
......@@ -37,6 +37,8 @@
* wp_properties_unref().
*/
#define G_LOG_DOMAIN "wp-properties"
#include "properties.h"
#include <errno.h>
......
......@@ -12,7 +12,10 @@
*
*/
#define G_LOG_DOMAIN "wp-proxy"
#include "proxy.h"
#include "debug.h"
#include "core.h"
#include "error.h"
#include "wpenums.h"
......@@ -82,8 +85,7 @@ proxy_event_destroy (void *data)
GHashTableIter iter;
GTask *task;
g_debug ("%s:%p destroyed pw_proxy %p (%u)",
G_OBJECT_TYPE_NAME (self), self, priv->pw_proxy,
wp_trace_object (self, "destroyed pw_proxy %p (%u)", priv->pw_proxy,
priv->global ? priv->global->id : pw_proxy_get_bound_id (priv->pw_proxy));
spa_hook_remove (&priv->listener);
......@@ -177,8 +179,7 @@ wp_proxy_dispose (GObject * object)
{
WpProxyPrivate *priv = wp_proxy_get_instance_private (WP_PROXY(object));
g_debug ("%s:%p dispose (global %u; pw_proxy %p)",
G_OBJECT_TYPE_NAME (object), object,
wp_trace_object (object, "dispose (global %u; pw_proxy %p)",
priv->global ? priv->global->id : 0, priv->pw_proxy);
if (priv->global)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment