mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-20 15:48:54 +02:00
Merge branch '1523-network-monitor-debugging' into 'master'
giomodule: Print the type of each default GIO module See merge request GNOME/glib!319
This commit is contained in:
@@ -885,6 +885,8 @@ _g_io_module_get_default (const gchar *extension_point,
|
|||||||
if (g_hash_table_lookup_extended (default_modules, extension_point,
|
if (g_hash_table_lookup_extended (default_modules, extension_point,
|
||||||
&key, &impl))
|
&key, &impl))
|
||||||
{
|
{
|
||||||
|
/* Don’t debug here, since we’re returning a cached object which was
|
||||||
|
* already printed earlier. */
|
||||||
g_rec_mutex_unlock (&default_modules_lock);
|
g_rec_mutex_unlock (&default_modules_lock);
|
||||||
return impl;
|
return impl;
|
||||||
}
|
}
|
||||||
@@ -899,6 +901,8 @@ _g_io_module_get_default (const gchar *extension_point,
|
|||||||
|
|
||||||
if (!ep)
|
if (!ep)
|
||||||
{
|
{
|
||||||
|
g_debug ("%s: Failed to find extension point ‘%s’",
|
||||||
|
G_STRFUNC, extension_point);
|
||||||
g_warn_if_reached ();
|
g_warn_if_reached ();
|
||||||
g_rec_mutex_unlock (&default_modules_lock);
|
g_rec_mutex_unlock (&default_modules_lock);
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -911,6 +915,7 @@ _g_io_module_get_default (const gchar *extension_point,
|
|||||||
if (preferred)
|
if (preferred)
|
||||||
{
|
{
|
||||||
impl = try_implementation (extension_point, preferred, verify_func);
|
impl = try_implementation (extension_point, preferred, verify_func);
|
||||||
|
extension = preferred;
|
||||||
if (impl)
|
if (impl)
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
@@ -939,6 +944,14 @@ _g_io_module_get_default (const gchar *extension_point,
|
|||||||
impl ? g_object_ref (impl) : NULL);
|
impl ? g_object_ref (impl) : NULL);
|
||||||
g_rec_mutex_unlock (&default_modules_lock);
|
g_rec_mutex_unlock (&default_modules_lock);
|
||||||
|
|
||||||
|
if (impl != NULL)
|
||||||
|
g_debug ("%s: Found default implementation %s (%s) for ‘%s’",
|
||||||
|
G_STRFUNC, g_io_extension_get_name (extension),
|
||||||
|
G_OBJECT_TYPE_NAME (impl), extension_point);
|
||||||
|
else
|
||||||
|
g_debug ("%s: Failed to find default implementation for ‘%s’",
|
||||||
|
G_STRFUNC, extension_point);
|
||||||
|
|
||||||
return impl;
|
return impl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user