This allows to monitor when a client exits. Clients in general don't
register a name in the bus and in some cases it's even not allowed to do
(for example an agent talking to bluetoothd, that runs in system bus).
Patch by: José Roberto de Souza <zehortigoza@profusion.mobi>
SVN revision: 80687
Refactor edbus_signal_handler_add() so internal signal handlers don't
set the connection free callback. This fixes the bug in which
EDBus_Connection was freeing the signal handler of EDBus_Conenction_Name
==22814== Invalid read of size 4
==22814== at 0x40564B0: edbus_signal_handler_del (edbus_signal_handler.c:278)
==22814== by 0x4040E65: _edbus_connection_name_unref (edbus_core.c:507)
==22814== by 0x404106B: edbus_connection_name_owner_monitor (edbus_core.c:520)
==22814== by 0x4055F63: _edbus_signal_handler_clean (edbus_signal_handler.c:217)
==22814== by 0x40564F8: edbus_signal_handler_del (edbus_signal_handler.c:279)
==22814== by 0x4043088: _edbus_connection_unref (edbus_core.c:1045)
==22814== by 0x404352F: edbus_connection_unref (edbus_core.c:1105)
==22814== by 0x80498AA: main (banshee.c:233)
==22814== Address 0x44bea48 is 0 bytes inside a block of size 72 free'd
==22814== at 0x402C06C: free (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==22814== by 0x4056118: _edbus_signal_handler_del (edbus_signal_handler.c:249)
==22814== by 0x4056401: edbus_signal_handler_unref (edbus_signal_handler.c:272)
==22814== by 0x4056503: edbus_signal_handler_del (edbus_signal_handler.c:280)
==22814== by 0x4043088: _edbus_connection_unref (edbus_core.c:1045)
==22814== by 0x404352F: edbus_connection_unref (edbus_core.c:1105)
==22814== by 0x80498AA: main (banshee.c:233)
==22814==
CRI<22814>: src/lib/edbus_signal_handler.c:278 edbus_signal_handler_del() *** Eina Magic Check Failed !!!
Input handle has already been freed!
*** NAUGHTY PROGRAMMER!!!
*** SPANK SPANK SPANK!!!
*** Now go fix your code. Tut tut tut!
Patch by: José Roberto de Souza <zehortigoza@profusion.mobi>
SVN revision: 80686
Simplifications on "monitor" of NameOwnerChanged
Life cycle tied with refcount, objs, and name_owner_changed list.
Patch by: José Roberto de Souza <zehortigoza@profusion.mobi>
SVN revision: 80684
This way is much simpler and doesn't generate many events when main loop
is quit inside of a signal handler callback.
Patch by: José Roberto de Souza <zehortigoza@profusion.mobi>
SVN revision: 80683
Also removed edbus_object_interfaces_added_callback_add/del() because we already
have object events for that.
Patch by: José Roberto de Souza <zehortigoza@profusion.mobi>
SVN revision: 80680
Example: there's an object in "/org/bla" and we are adding an object in
"/". Thus the second should becaome the parent of the first, which was a
root object since it had no parent yet.
Patch by: José Roberto de Souza <zehortigoza@profusion.mobi>
SVN revision: 79386
Without this message, it's not possible for user create the error
message. Also update the docs to clarify usage of the Get/Set callbacks.
Patch by: José Roberto de Souza <zehortigoza@profusion.mobi>
SVN revision: 79380
The problem is: if there's any arg with invalid signatures, we cannot
continue adding the interface. Just fail with a log message so user will
notice it.
This means we need to check if signals are valid much earlier. Actually
before even adding the object/interface.
Also change the iteration on signals so we don't use a needless index.
SVN revision: 79184
strncmp'ing is not sufficient because it whould fail in case an object
like "/org/bla" is registered (and in conn->root_objs) and we were
registering "/org/blatest/". We would incorrectly put "/org/bla" as son
of "/org/blatest". Fix this by looking up the next char, checking if
it's a slash.
Also re-format the code a little bit.
SVN revision: 79179
No need to strlen(obj->path) twice per loop iteration. Do it only once
and add a comment explaining the difference between handling "/" and
"/my/path/to/obj".
SVN revision: 79176
missing - at r4untime we wont get them, but hey - we'll compile at
least and when dbus is upgrade... we'll get them and work right. :)
SVN revision: 79080