summaryrefslogtreecommitdiff
path: root/telepathy-glib/dbus-daemon.c
Commit message (Collapse)AuthorAgeFilesLines
* Stop using TP_ERRORSSimon McVittie2012-05-021-8/+8
| | | | We deprecated this in 0.11.
* Use GLib's default marshaller everywhereSimon McVittie2012-03-011-2/+0
| | | | | | | | 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>
* Add config.h include in all source filesXavier Claessens2012-02-061-0/+2
|
* Use _unref instead of _free _destroy when possible.Xavier Claessens2011-11-161-1/+1
| | | | | | | | | | | 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/
* tp_dbus_daemon_watch_name_owner & ..._list_names_common leak a DBusMessageVivek Dasmohapatra2011-05-041-0/+2
| | | | dbus_connection_send_with_reply does not take ownership so we must unref
* Fix iteration over arrays of name-owner watchesSimon McVittie2010-12-161-5/+10
| | | | | | | | | | | 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.
* Don't remove NameOwnerChanged callbacks while invoking themSimon McVittie2010-12-161-23/+58
|
* Simplify dispatching NameOwnerChanged signals.Will Thompson2010-12-141-97/+52
| | | | | | | | | | | | | | | | | | | | 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.
* Remove redundant trailing semicolons from G_DEFINE_TYPE etc.Simon McVittie2010-10-061-1/+1
| | | | ISO C forbids them, and they're an easy thing to get rid of.
* Remove tp_dbus_daemon_cancel_name_owner_watch from introspectionSimon McVittie2010-09-151-2/+2
| | | | | After discussion with pwithnall, it looks as though this method isn't useful for g-i bindings.
* Add some missing annotationsSimon McVittie2010-09-151-1/+1
|
* Fix up some warnings produced by g-ir-scannerDanielle Madeley2010-09-101-2/+2
|
* Add the proper namespace to (type Object) annotations.Travis Reitter2010-06-171-3/+3
|
* add _tp_dbus_daemon_is_the_shared_one as internal APIGuillaume Desmottes2010-05-051-0/+6
|
* Use macros WARNING(), etc., consistently (within the library)Simon McVittie2010-04-301-12/+12
|
* Remove DBusGLib-1.0.gir requirementDanielle Madeley2010-04-281-1/+1
| | | | | | | | | | | | 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.
* Add/update version annotationsSimon McVittie2010-04-201-0/+4
|
* tp_dbus_daemon_register_object, tp_dbus_daemon_unregister_object: addSimon McVittie2010-04-191-0/+45
| | | | | Not having to extract the DBusGConnection from the TpDBusDaemon turns out to be a significant win in terms of amount of code.
* Annotate an intentional one-per-process leakSimon McVittie2009-12-031-0/+4
|
* When removing the last TpDBusDaemon from a DBusConnection, forcibly free the ↵Simon McVittie2009-08-181-0/+7
| | | | | | | | | | | | | | | | | | | | | 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>
* NEWS, version annotations for 0.7.35Simon McVittie2009-08-181-4/+4
|
* tp_dbus_daemon_get_unique_name: fix docsSimon McVittie2009-08-171-0/+1
|
* tp_dbus_daemon_watch_name_owner: don't leak the match ruleSimon McVittie2009-08-171-0/+1
|
* TpDBusDaemon: remove redundant checkSimon McVittie2009-08-171-1/+0
| | | | | | 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).
* Add tp_dbus_daemon_list_names, tp_dbus_daemon_list_activatable_namesSimon McVittie2009-08-171-0/+272
| | | | | These use libdbus directly, to avoid DBusGProxy's undesirable signal-binding (which causes us to wake up on every NameOwnerChanged).
* TpDBusDaemon: reduce and improve debug outputSimon McVittie2009-08-171-7/+5
|
* Separate dbus.c into dbus.c and dbus-daemon.cSimon McVittie2009-08-171-0/+1098
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).