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>
Neutralise and deprecate the --uninstall option in the schema compiler
and remove it from gsettings.m4.
Make the new default behaviour a compromise between the old default
behaviour and the previous --uninstall option:
- never return a failure code if no schema files are found
- issue a warning instead
- remove the gschemas.compiled file if it exists
We only ever do the enum mapping for the property binding in the case
that a GParamSpecEnum exists and in that case the class is already
referenced by the GParamSpec. Use peek instead of ref/unref and add a
clarifying note.
Fix a bug where the type from g_variant_get_type() was used after
freeing the variant. This works for base types (since they are cached
and live forever) but not for arrays (where the bug was first seen).
Hold the GSettingsKeyInfo as part of the binding structure to save work
on each get/set. Use our copy of this structure to call the internal
get/set APIs. Give more descriptive error messages in the case of
invalid data on sets and retry using the translated default then schema
default value in case of failure to map on reads.
When creating a binding between two object properties we might want to
automatically synchronize the two values at the moment of the binding
creation, instead of waiting for the next change.
The G_BINDING_SYNC_CREATE flag does exactly what it says on the tin.
https://bugzilla.gnome.org/show_bug.cgi?id=622281
If we know the expected interface (e.g. :g-interface-info is set),
then we always warned when calling a method on a different
interface. Don't do that, there's no way the expected interface can
know anything about this method.
Signed-off-by: David Zeuthen <davidz@redhat.com>
Either child_watch_source or timeout_source will already have been
destroyed after we finish the loop, and it's not safe to call
g_source_destroy() on it a second time unless we're still holding a
ref on it.
When disposing a GSocketConnection, don't explicitly close the
underlying GSocket. The GSocket will close itself if it gets
destroyed, and if it doesn't get destroyed, that presumably means the
app still wants to use it. Eg, this lets you use GSocketClient to
create a GSocketConnection, and then take the GSocket and destroy the
GSocketConnection.
https://bugzilla.gnome.org/show_bug.cgi?id=616855
The GSocket docs point out that g_socket_send/g_socket_receive may
return G_IO_ERROR_WOULD_BLOCK even if g_socket_condition_check claimed
that they wouldn't. Fix the socket streams to check for that.
https://bugzilla.gnome.org/show_bug.cgi?id=603309