dbus_threads_init: call _dbus_threads_init_platform_specific()

This reverses the relationship between these two functions.
Previously, dbus_threads_init() wouldn't allocate dbus_cond_event_tls
on Windows, call check_monotonic_clock on Unix, or call
_dbus_check_setuid on Unix.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=54972
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Alban Crequy <alban.crequy@collabora.co.uk>
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
This commit is contained in:
Simon McVittie 2013-04-15 13:54:39 +01:00
parent c36f21a2e9
commit eabf6c42a1
3 changed files with 7 additions and 5 deletions

View file

@ -283,5 +283,6 @@ _dbus_threads_init_platform_specific (void)
*/
check_monotonic_clock ();
(void) _dbus_check_setuid ();
return dbus_threads_init (NULL);
return TRUE;
}

View file

@ -269,6 +269,6 @@ _dbus_threads_init_platform_specific (void)
return FALSE;
}
return dbus_threads_init (NULL);
return TRUE;
}

View file

@ -584,7 +584,8 @@ dbus_threads_init (const DBusThreadFunctions *functions)
if (thread_init_generation == _dbus_current_generation)
return TRUE;
if (!init_locks ())
if (!_dbus_threads_init_platform_specific() ||
!init_locks ())
return FALSE;
thread_init_generation = _dbus_current_generation;
@ -613,7 +614,7 @@ dbus_threads_init (const DBusThreadFunctions *functions)
dbus_bool_t
dbus_threads_init_default (void)
{
return _dbus_threads_init_platform_specific ();
return dbus_threads_init (NULL);
}
@ -624,7 +625,7 @@ dbus_threads_init_default (void)
dbus_bool_t
_dbus_threads_init_debug (void)
{
return _dbus_threads_init_platform_specific();
return dbus_threads_init (NULL);
}
#endif /* DBUS_BUILD_TESTS */