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
Say what you want, but this creates quite a lot of warnings, and
warnings when including another header into a project is no good. I want
to just see my own warnings.
So as long as there is only two NULLs, please let them be there.
SVN revision: 78873
We were expected to pass an int pointer, but instead we were passing a
char, which leads to a crash in complex_type_server.
Patch by: José Roberto de Souza <zehortigoza@profusion.mobi>
SVN revision: 78623
Instead of having to enable the examples during configure time, separate
the examples in a special target, "make examples". It's currently a bit
different from the libraries in the common efl tree since we are not
using recursive makefiles.
SVN revision: 78622
Doygen tells us:
warning: Tag `SHOW_DIRECTORIES' at line 507 of file Doxyfile has become obsolete.
To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"
warning: Tag `HTML_ALIGN_MEMBERS' at line 879 of file Doxyfile has become obsolete.
To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"
warning: Tag `USE_INLINE_TREES' at line 1065 of file Doxyfile has become obsolete.
To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"
So we are nice and remove them. A yay for the day where we have amerged tree and
not two dozens of Doxyfile.in files floating around.
SVN revision: 78409
If a signal handler callback remove the last reference of his parent, his parent
will unref all your childrens including signal handler, but signal handler could
not be freed until your callback was finish so a event to delete it will be
created and when this event happen the signal handler parent was already freed
and we could not call _on_signal_handler_free().
Patch by: José Roberto de Souza <zehortigoza@profusion.mobi>
SVN revision: 78198
When reading messages that contain structs the type that comes from the
wire (and obtained with dbus_message_iter_get_arg_type()) is 'r'.
However 'r' never appears in a signature and dbus_signature_iter_*
returns '('.
Ref: http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-signatures
"STRUCT has a type code, ASCII character 'r', but this type code does not
appear in signatures. Instead, ASCII characters '(' and ')' are used to
mark the beginning and end of the struct. So for example, a struct
containing two integers would have this signature:"
Patch by: José Roberto de Souza <zehortigoza@profusion.mobi>
SVN revision: 78072
Rename edbus_message_iter_append_basic to edbus_message_iter_basic_append.
Rename edbus_message_iter_get_basic to edbus_message_iter_basic_get
Patch by: José Roberto de Souza <zehortigoza@profusion.mobi>
SVN revision: 78067