Age | Commit message (Collapse) | Author | Files | Lines |
|
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37793
Bug-NB: related to NB#218973
|
|
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37793
Bug-NB: related to NB#218973
|
|
Otherwise we'd probably crash when we cast the vtable to an inappropriate
type, and call its methods with inappropriate arguments as a result.
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37793
Bug-NB: related to NB#218973
|
|
Previously, if it wasn't a collection or didn't have the fixed_accessor,
we'd just segfault. Not ideal.
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37793
Bug-NB: related to NB#218973
|
|
It's just about conceivable that they wouldn't segfault, if application
authors carefully avoided the unimplemented functionality... but still.
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37793
Bug-NB: related to NB#218973
|
|
* attach the introductory doc-comments to the enum and macro names,
not the internal function
* remove docs for method parameters which didn't actually exist
* more cross-references
* make the domain macro visible in the documentation index
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37793
Bug-NB: related to NB#218973
|
|
I used an absolute path to avoid differing behaviour with older versions
of gtk-doc, where DOC_SOURCE_DIR was relative to the *source* directory.
Also resync doc/reference/Makefile.am with gtk-doc's example.
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
|
|
Returning false doesn't strictly imply that the error is set; if you're
being pedantic enough, it's really a tri-state where TRUE indicates
success, FALSE indicates failure, and calling the function incorrectly
results in undefined behaviour (currently a critical warning and
returning FALSE).
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37793
Bug-NB: NB#218973
|
|
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37793
Bug-NB: related to NB#218973
|
|
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37793
Bug-NB: related to NB#218973
|
|
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37793
Bug-NB: related to NB#218973
|
|
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37793
Bug-NB: related to NB#218973
|
|
better
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37793
Bug-NB: related to NB#218973
|
|
* document the instance struct
* make argument names match the headers
* document the GType macro, not the function it calls, and mention it
in the documentation (since this is a boxed type, so it's non-obvious)
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37793
Bug-NB: related to NB#218973
|
|
* introductory doc-comment for the (pseudo-)class
* attach the doc-comment for the GType to the macro, not the internal
function
* rename function parameters to match what the header file says
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37793
Bug-NB: related to NB#218973
|
|
gtk-doc only cares about the basename of the files.
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37793
Bug-NB: related to NB#218973
|
|
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37793
Bug-NB: related to NB#218973
|
|
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37793
Bug-NB: related to NB#218973
|
|
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37793
Bug-NB: related to NB#218973
|
|
|
|
|
|
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=35766
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
|
|
This isn't necessarily OOM: _dbus_gvalue_marshal can fail due to
programming errors. If so, raise a critical warning, then (if that wasn't
fatal) return a D-Bus error to be sent to the caller.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=35766
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
|
|
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=35766
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
|
|
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=35766
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
|
|
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=35766
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
Conflicts:
dbus/dbus-gobject.c
|
|
This is an assertion, not a return_if_fail, because we already checked
the object path in dbus_g_connection_register_g_object and the others
in export_signals.
After these checks, dbus_message_new_signal can really only fail on OOM.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=35766
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
|
|
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=35766
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
|
|
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=35766
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
|
|
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=35766
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
|
|
If the remote process sends us a wrong message, that's its fault, not
ours; we should send back a comprehensible D-Bus error, and not spam
to stderr.
Previously, in each of these cases libdbus would have sent back NoReply,
because we declined to handle the method call.
One case that's still wrong is passing extra arguments to Get, GetAll or
Set, like so:
Get("com.example.Iface", "MyProperty", "extra")
Set("com.example.Iface", "MyProperty", Variant("foo"), "extra")
GetAll("com.example.Iface", "extra")
dbus-glib has historically warned, ignored the extra argument(s) and sent
back a reply as if they hadn't been there, whereas a stricter
implementation (like telepathy-glib's TpDBusPropertiesMixin) would
have sent back an error reply and done nothing.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=35766
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
|
|
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=35766
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
|
|
Also treat all errors here as programming errors (because this method
should never fail), upgrading them from warning to critical; return a
D-Bus error reply anyway, to be nicer to our callers.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=35766
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
|
|
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=35766
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
|
|
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=35766
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
Conflicts:
dbus/dbus-gobject.c
|
|
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=35766
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
|
|
We shouldn't report this as OOM, because it probably wasn't (it's much
more likely to be programming error); we should also continue through the
arguments, so that we don't leak them.
By abandoning the message as soon as we detect a programming error,
we can use reply == NULL as an indicator of whether to keep appending.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=35767
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
|
|
I just made it fatal, since it's either programming error or OOM.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=35767
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
|
|
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=35767
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
|
|
There's no point in doing graceful unwinding here, since it really
shouldn't happen.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=35767
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
|
|
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=35767
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
|
|
got_name_owner_cb never adds the proxy to the unassociated_proxies list
if there is a D-Bus error other than NameHasNoOwner.
Based on a patch from Janne Karhunen, for Maemo.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38408
Bug-NB: NB#116862
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
|
|
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38406
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
|
|
These marshallers are actually dual-use: they're used to call certain
methods on MyObject, and also to bind to its signals.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38406
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
|
|
G_VALUE_COLLECT can fail (admittedly, it's a programming error if it
does). Previously, we leaked the resulting g_malloc'd string; now we
emit a critical warning, free it, and abort the call.
Based on patches from Kimmo Hämäläinen and Christian Dywan in Maemo's
dbus-glib.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38406
Bug-NB: NB#86280
Bug-NB: NB#180486 (CID-34419 to CID-34424 inclusive)
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
|
|
There's no need to special-case it any more - we can just use
dbus_g_proxy_end_call_internal and rely on it to cope.
This reverts the fix for fd.o #12675, since the commit before this one
is more general.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38406
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
|
|
As well as happening on a programming error or OOM (which both provoke
critical warnings), dbus_g_proxy_begin_call_internal() can legitimately
fail if we got disconnected from D-Bus (so can't send any more), but are
still working through our backlog of incoming messages (so we haven't
got round to the Disconnected message yet, so the DBusGProxy hasn't
emitted ::destroy).
fd.o #12675 fixed dbus_g_proxy_call(), but dbus_g_proxy_call_with_timeout()
and the asynchronous API still need similar treatment.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38406
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
|
|
If you don't block waiting for the reply to AddMatch, and you're using two
connections to the bus, then messages sent from connection 2 might not
be matched by connection 1, because they arrive before the AddMatch call
from connection 1. This manifests itself as the /registrations/twice
test *sometimes* failing (dependent on timing).
Only tests with two parallel bus connections need this, but to be safe,
I've added it throughout this test.
Reviewed-by: Vivek Dasmohapatra <vivek@collabora.co.uk>
|
|
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39475
|
|
Based on a patch from Christian Dywan <christian.dywan@lanedo.com>.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=29884
Bug-NB: NB#180486
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
|