mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-05-07 19:08:03 +02:00
* Change an assert to a detailed warning and abort.
When allocator->lock != mutex it indicates that the user has failed to initalize threads before using the D-Bus library. This warning helps the user identify the issue and fix their app.
This commit is contained in:
parent
10b79991cc
commit
5628ef82de
2 changed files with 13 additions and 2 deletions
|
|
@ -1,3 +1,11 @@
|
|||
2006-08-09 John (J5) Palmieri <johnp@redhat.com>
|
||||
|
||||
* dbus/dbus-dataslot.c (_dbus_data_slot_allocator_alloc):
|
||||
Change an assert to a detailed warning and abort.
|
||||
When allocator->lock != mutex it indicates that the user has failed
|
||||
to initalize threads before using the D-Bus library. This warning
|
||||
helps the user identify the issue and fix their app.
|
||||
|
||||
2006-08-08 John (J5) Palmieri <johnp@redhat.com>
|
||||
|
||||
These are all patches from Kjartan Maraas <kmaraas at gnome dot org>
|
||||
|
|
|
|||
|
|
@ -78,8 +78,11 @@ _dbus_data_slot_allocator_alloc (DBusDataSlotAllocator *allocator,
|
|||
_dbus_assert (allocator->lock == NULL);
|
||||
allocator->lock = mutex;
|
||||
}
|
||||
else
|
||||
_dbus_assert (allocator->lock == mutex);
|
||||
else if (allocator->lock != mutex)
|
||||
{
|
||||
_dbus_warn ("D-Bus threads were initialized after first using the D-Bus library. If your application does not directly initialize threads or use D-Bus, keep in mind that some library or plugin may have used D-Bus or initialized threads behind your back. You can often fix this problem by calling dbus_init_threads() or dbus_g_threads_init() early in your main() method, before D-Bus is used.");
|
||||
_dbus_abort ();
|
||||
}
|
||||
|
||||
if (*slot_id_p >= 0)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue