The default GNOME 3.10 login process right now has gdm spawn a session
for the login screen, retaining the X server, but closing the session
bus. Right now in this scenario many GNOME components such as
gnome-settings-daemon attempt to "clean up" on shutdown by releasing
their owned names.
But they're shutting down because the session bus went away, so
releasing the name is pointless, and presently spews an error into the
journal.
This patch avoids that error spew, which helps system administrators
find *real* problems.
https://bugzilla.gnome.org/show_bug.cgi?id=704567
Add g_main_context_ref_thread_default(), which always returns a
reffed GMainContext, rather than sometimes returning a (non-reffed)
GMainContext, and sometimes returning NULL. This simplifies the
bookkeeping in any code that needs to keep a reference to the
thread-default context for a while.
https://bugzilla.gnome.org/show_bug.cgi?id=660994
To help cross compilation, don't use glib-genmarshal in our
build. This is easy now that we have g_cclosure_marshal_generic().
In gobject/, add gmarshal.[ch] to git (making the existing entry
points stubs).
In gio/, simply switch to using g_cclosure_marshal_generic().
https://bugzilla.gnome.org/show_bug.cgi?id=652168
The GClosure API is a bit funky (and badly documented), and requires
you to set a marshaller on the closure, and the marshaller has an
implicit 'this' argument, and the caller is reponsible for unsetting
the values after invoking the closure.
I've added some calls of the _with_closures variants to the
gdbus-names test now.
This is currently unused but will probably be useful in the
future. For example, we could have a _ARG0_IS_PATH to specify that
arg0 should be used for arg0path.
This commit breaks API and ABI. Users of
g_dbus_connection_signal_subscribe() will need to port to this new
version.
Signed-off-by: David Zeuthen <davidz@redhat.com>
There's a couple of places in GDBus where it's a programming error
(e.g. we'll assert or spew via e.g. g_warning()) to use the API on a
closed connection. This approach can never work since a
GDBusConnection can be closed at any point in time outside of
programmer control.
Just change the code to return a run-time error (e.g. return
G_IO_ERROR_CLOSED when sending messages, invoking methods) or silently
accept the request (e.g. exporting objects, registering for signals)
without doing anything.
Note that a GDBusConnection object is always useless after being
closed - e.g. there's no way to "reopen" a connection - the user will
have to create a new object and use that instead.
https://bugzilla.gnome.org/show_bug.cgi?id=623143
Signed-off-by: David Zeuthen <davidz@redhat.com>
accept more than one callback.
g_bus_own_name_with_closures
g_bus_own_name_on_connection_with_closures
g_bus_watch_name_with_closures
g_bus_watch_name_on_connection_with_closures
g_bus_watch_proxy_with_closures
g_bus_watch_proxy_on_connection_with_closures
https://bugzilla.gnome.org/show_bug.cgi?id=621092
This allows the caller to specify the reply type that they are expecting
for this call. If the reply comes back with the wrong type, GDBus will
generate an appropriate error internally.
- add a GVariantType * argument to g_dbus_connection_call() and
_call_sync().
- move the internal API for computing message types from introspection
data to be based on GVariantType instead of strings. Update users
of this code.
- have GDBusProxy pass this calculated GVariantType into
g_dbus_connection_call(). Remove the checks done in GDBusProxy.
- Update other users of the code (test cases, gdbus-tool, GSettings
tool, etc). In some cases, remove redundant checks; in some other
cases, we are fixing bugs because no checking was done where it
should have been.
Closes bug #619391.
Lots of people been suggesting this. We still use MethodInvocation /
method_invocation for handling incoming method calls so use call()
instead of invoke_method() helps to separate the client and server
facilities. Which is a good thing(tm).
Things compile and the test-suite passes. Still need to hook up
gio.symbols and docs. There are still a bunch of TODOs left in the
sources that needs to be addressed.
Signed-off-by: David Zeuthen <davidz@redhat.com>