| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
We deprecated this in 0.11.
|
|
|
|
|
|
|
|
| |
In contrast to the previous commit, I'm just using NULL here -
telepathy-glib has an explicit dependency on GLib 2.30.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=46523
Reviewed-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Replace g_(ptr_)array_free (foo, TRUE) and g_hash_table_destroy
with respectively g_(ptr_)array_unref (foo) and g_hash_table_unref.
I used this command to generate this patch:
for f in `find -name "*.c"`; do sed -i $f -re 's/g_ptr_array_free \(([^ ,]+), TRUE\)/g_ptr_array_unref \(\1\)/'; done
See Danielle's blog for explanation of possible bug _free can do:
http://blogs.gnome.org/danni/2011/11/16/mistakes-with-g_value_set_boxed/
|
|
|
|
| |
dbus_connection_send_with_reply does not take ownership so we must unref
|
|
|
|
|
|
|
|
|
|
|
| |
Also document why we're iterating backwards.
In tp_dbus_daemon_maybe_free_name_owner_watch, the flawed
reverse-iteration was a bug: we'd skip over the element before a removed
entry, which might mean not freeing it.
In tp_dbus_daemon_cancel_name_owner_watch, it was done correctly (because
there were no deletions), but it did hurt clarity.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously there was this weird model where TpDBusDaemon had a dict
mapping bus names being watched to a watch struct. The watch struct had
a callback and some user data. When the library user first added a watch
for a name, their callback would be shoved into a new struct that was
put into the dict, and all was bright. But when a second call to
_watch_name_owner() came along … a GArray of "sub watches" would be
created, the old callback copied into it and the new callback added to
it, and then the original struct's callback would be replaced by an
callback that iterates the subwatches.
I couldn't see any good reason not to always have a list of callbacks,
so deleted that code. Now all watches have a list of callbacks, and it's
a bit clearer.
Making this change found a nasty bug where, if one callback removes its
own watch, subsequent callbacks may not be called for this signal. Test
case and fix to follow.
|
|
|
|
| |
ISO C forbids them, and they're an easy thing to get rid of.
|
|
|
|
|
| |
After discussion with pwithnall, it looks as though this method isn't
useful for g-i bindings.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
No one has DBusGLib-1.0.gir, it doesn't ship. It's not at all crucial for
tp-glib, you can do everything you need to do with a TpDBusDaemon. This patch
removes the requirement for it and (skip)s any functions that pass dbus-glib
types as parameters or returns.
This currently breaks the build due to
https://bugzilla.gnome.org/show_bug.cgi?id=616375 -- which makes it impossible
to skip a GObject property, and thus one mention of DBusGConnection appears in
the GIR. You can remove this by hand and rerun 'make' and things will be fine.
|
| |
|
|
|
|
|
| |
Not having to extract the DBusGConnection from the TpDBusDaemon turns out
to be a significant win in terms of amount of code.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GSList ** too
You might think (and indeed I did) that
dbus_connection_free_data_slot (&daemons_slot) would automatically clear
out that slot on every DBusConnection, calling the registered
free-function for the old contents.
This is, as it turns out, untrue; you have to do that yourself, first.
This turns out to crash git master (the MC 4 branch) of Empathy during
startup: it briefly creates a TpDBusDaemon, then deallocates it again.
The GSList ** is placed in slot 2 on the DBusConnection. We then
deallocate slot 2. When dbus-glib allocates a new slot number for its
DBusGProxyManager objects, it is also told to use slot 2; it looks in
slot 2, finds our GSList ** still there, interprets it as a
DBusGProxyManager *, and crashes with an assertion failure.
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
tp_dbus_check_valid_bus_name criticals and returns FALSE if name is NULL,
so we don't need to check that separately (also, this was done in the
wrong order).
|
|
|
|
|
| |
These use libdbus directly, to avoid DBusGProxy's undesirable
signal-binding (which causes us to wake up on every NameOwnerChanged).
|
| |
|
|
No code changes, except renaming starter_bus_conn to
_tp_dbus_starter_bus_conn and making it visible within telepathy-glib
(both of the split modules need it, now).
|