Lukasz Skalski [Mon, 29 Sep 2014 15:34:05 +0000 (17:34 +0200)]
[kdbus] Initial support for two new bus types: 'user' and 'machine'
Change-Id: I3976e3935a01ea8d67b9a41997d0be8a37765d00
Lukasz Skalski [Mon, 29 Sep 2014 15:01:06 +0000 (17:01 +0200)]
[kdbus] Add "--enable-kdbus" configure switch
Change-Id: Id22e381c0d9dd9cda194ac8a3a03a1d1362a13ca
Lukasz Skalski [Mon, 29 Sep 2014 10:37:10 +0000 (12:37 +0200)]
[kdbus] Import kdbus interface header (commit:
5df28e6dd30b)
Change-Id: Iec05e26a512c3e923442bd9d4fcc3e8ad94df36b
Lukasz Skalski [Fri, 22 Aug 2014 13:53:59 +0000 (15:53 +0200)]
[kdbus] Add new library API for common tasks on dbus/kdbus
For kdbus purpose we need introduce two new bus types
called "user" and "machine". Will not be possible to
make calls to the 'org.freedesktop.DBus' destination on
the new bus types, thus this patch introduce new API
for tasks such as "get Unix user ID of the process connected
to the server", "returns a list of all currently-owned names
on the bus" and so on.
Change-Id: Ib9ba65346290d597341d4157b09cb45bd3d1151d
Lukasz Skalski [Fri, 22 Aug 2014 12:49:29 +0000 (14:49 +0200)]
[kdbus] Add SipHash algorithm
Change-Id: I83f28c2249efd6dc8cf78e0383916c46d71df075
Lukasz Skalski [Fri, 22 Aug 2014 12:48:53 +0000 (14:48 +0200)]
[kdbus] Add README.md file
Change-Id: I064de04278990abe97bea28d1b80ddc3f42a05e0
Ryan Lortie [Thu, 4 Dec 2014 15:51:30 +0000 (10:51 -0500)]
grow our __NR_memfd_create collection
Also add a fallback case in case we don't know the arch.
Ryan Lortie [Thu, 4 Dec 2014 02:28:24 +0000 (21:28 -0500)]
oops
Ryan Lortie [Thu, 4 Dec 2014 02:20:32 +0000 (21:20 -0500)]
further cleanup
Ryan Lortie [Thu, 4 Dec 2014 02:06:28 +0000 (21:06 -0500)]
cleanup
Ryan Lortie [Thu, 4 Dec 2014 01:35:18 +0000 (20:35 -0500)]
finish up vector deserialiser
seems to have stopped crashing now...
Ryan Lortie [Wed, 3 Dec 2014 22:16:37 +0000 (17:16 -0500)]
tests: add GBytes memfd testcase
Ryan Lortie [Wed, 3 Dec 2014 22:15:31 +0000 (17:15 -0500)]
Add new internal header glib-linux.h
This defines some constants and syscall wrappers for features which may
not yet have appeared in the libc.
Ryan Lortie [Wed, 3 Dec 2014 22:13:43 +0000 (17:13 -0500)]
GBytes: two memfd tweaks
1) mmap() of a 0-sized region is EINVAL, so don't try that
2) MAP_SHARED on a sealed memfd fails for some reason, so use
MAP_PRIVATE instead
Ryan Lortie [Wed, 3 Dec 2014 08:12:06 +0000 (03:12 -0500)]
start fleshing out guts of vector deserialiser
Ryan Lortie [Wed, 3 Dec 2014 07:14:19 +0000 (02:14 -0500)]
GVariant vector deserialiser WIP
Ryan Lortie [Wed, 3 Dec 2014 07:10:24 +0000 (02:10 -0500)]
GVariant: clean up g_variant_get_child_value()
Remove this one outstanding case of direct construction of GVariant
instances and port it to use g_variant_alloc() like everyone else.
Ryan Lortie [Wed, 3 Dec 2014 07:04:33 +0000 (02:04 -0500)]
GVariant: use GVariantTypeInfo on internal constructors
Take GVariantTypeInfo instead of a GVariantType on the internal
constructors for GVariant.
Although this results in a bit more code for almost every call, it turns
out that it makes most uses more convenient -- that fact that we consume
the GVariantInfo means that we don't have to go back to free the type
when we're done.
This change will allow us to port g_variant_get_child() over to using
g_variant_alloc(). It was the one outstanding place where we
constructed GVariant instances that was not yet using it.
Ryan Lortie [Sat, 29 Nov 2014 20:58:49 +0000 (15:58 -0500)]
GVariant: clean up serialised data handling API
Add a new pair of internal helpers to gvariant-core.c to provide a
unified way to construct and query the content of serialised GVariant
instances.
Rewrite g_variant_new_from_data() to use this.
Move g_variant_new_from_bytes() and g_variant_get_data_as_bytes() out of
-core and into gvariant.c, also rewriting them to use the same.
Take the time to do some cleanup and make some general improvements in
consistency:
- move the checks for improperly sized fixed-sized data out of
_new_from_bytes() and into the common code so that we do this check
on _new_from_data() as well
- correctly deal with the case of NULL data in _get_data_as_bytes().
This would have crashed before. Add a test for that.
- if the user hands us data with a size of zero then unref and/or
destroy-notify things immediately.
The idea that every GVariant must have an associated GBytes remains.
This could potentially be optimsed a bit further in the future, but the
cases where it could be avoided are only a few (errors, zero-size,
static stoarge) so let's not pursue that now.
Ryan Lortie [Sat, 29 Nov 2014 20:57:06 +0000 (15:57 -0500)]
GVariant: fix a trivial typo in a comment
Ryan Lortie [Sat, 29 Nov 2014 19:07:46 +0000 (14:07 -0500)]
GVariant: add support for single precision floats
Add a new type 'f' to correspond to single precision floating point
values.
This type was never added to D-Bus for two reasons:
1) there is no benefit to using float rather than doubles as parameters
for RPC
2) classically, you shouldn't move bulk data over D-Bus
Now that we've decided that we want to use D-Bus for bulk data
transfers, it makes a good deal of sense to want to send an array of
floats or an array of fixed-sized tuples containing floats.
https://bugzilla.gnome.org/show_bug.cgi?id=740897
Ryan Lortie [Fri, 28 Nov 2014 22:56:01 +0000 (17:56 -0500)]
GVariant test: add a new vector serialisation test
Generate a random value and make sure we get the same result as doing it
the 'usual' way (which is already subject to a whole lot of testing).
Ryan Lortie [Fri, 28 Nov 2014 22:57:30 +0000 (17:57 -0500)]
GVariant: support serialising to GVariantVectors
Add code for serialising GVariant to GVariantVectors.
Export that internally via the glib-private machanism so that we can use
it from GDBus.
Ryan Lortie [Fri, 28 Nov 2014 19:23:20 +0000 (14:23 -0500)]
GVariant: add GVariantVectors utility struct
This structure (and its associated functions) will be used as an
intermediate step for serialising GVariant instance onto kdbus without
copying large amounts of data.
Ryan Lortie [Sat, 29 Nov 2014 20:04:45 +0000 (15:04 -0500)]
GVariant: refactor locking a bit more
Change the internal g_variant_ensure_serialised() helper over to working
on unlocked instances and have it conditionally acquire the lock using
the utility function added in the last commit.
Ryan Lortie [Fri, 28 Nov 2014 20:42:34 +0000 (15:42 -0500)]
GVariant: add internal tree-form locking helper
Many of the core GVariant operations have two modes: one for tree-form
and one for serialised.
Once a GVariant is in serialised form it will always be serialised, so
it is safe to simply check for that and proceed with the operation in
that case.
A tree-form GVariant instance always has a chance of being implicitly
serialised, however, so we have to take locks when performing operations
on these.
Write a helper function that reliably checks if the instance is in
tree-form, locking it if it is. Rewrite some of the other functions to
use this helper. In some cases this simplifies the code and in others
it reduces locking.
Ryan Lortie [Thu, 27 Nov 2014 21:37:13 +0000 (16:37 -0500)]
GVariant: calculate size at construction
It's always possible to determine the serialised size of a GVariant
instance, even in the case that it is not yet serialised. This can be
done by calling g_variant_get_size() which will base its answer on the
size of each child (which must be recursively determined).
We must perform this process before we can allocate the buffer to
serialise a GVariant into (since we must know the size of the buffer).
This means that serialising a GVariant involves two steps that recurse
through the entire tree of values. We must take locks twice.
Simplify this by always determining the size when the instance is first
created, from the sizes of its children (which now will always be known
as well). We can do this without taking any locks because the
newly-created instance has never been exposed and because the size on
the children is now a constant that can be directly accessed without a
lock.
This is a reduction in complexity and will also be a performance
improvement in all cases where a GVariant is serialised. It will be a
slight performance hit in the case that we construct tree-form instances
and never serialise them.
Ryan Lortie [Tue, 2 Dec 2014 19:29:04 +0000 (14:29 -0500)]
GBytes: add g_bytes_get_zero_copy_fd()
Add a way to get the zero-copy fd back out of a GBytes that was created
from one.
Ryan Lortie [Tue, 2 Dec 2014 18:17:35 +0000 (13:17 -0500)]
GBytes: add new g_bytes_take_zero_copy_fd() function
This function takes a memfd, seals it, and creates a GBytes based on it.
David King [Tue, 2 Dec 2014 18:16:47 +0000 (13:16 -0500)]
glib-unix: add function to ensure an fd is sealed
Add a function that checks if a fd is sealed and, if it's not, seals it.
On Linux this is more or less an operation on memfd. On other systems,
it currently always returns FALSE.
Ryan Lortie [Tue, 2 Dec 2014 18:16:25 +0000 (13:16 -0500)]
GBytes: substantial internal rework
We have a wide variety of different sources of data for GBytes.
Instead of having all possibilities inside of a single structure type,
add a 'type' field and a couple of subtypes.
This also forces us to clean up our access to the ->data pointer from
all over the code which may become a problem in the future if we want to
lazy-map memfd GBytes instances by keeping the data pointer as NULL
until we are ready to use it.
We also introduce a new type of GBytes: 'inline'. This allows us to
make a single allocation instead of two in the g_bytes_new() case.
Ryan Lortie [Mon, 1 Dec 2014 21:33:32 +0000 (16:33 -0500)]
macros: add side-effecting variants of asserts
Add g_assert_se(), g_return_if_fail_se() and g_return_val_if_fail_se()
as variants of the existing macros that are guaranteed to evaluate side
effects in their expression argument. Inspired by similar macros in
systemd.
These are just macros, so they come at no extra cost.
https://bugzilla.gnome.org/show_bug.cgi?id=741026
Ignacio Casal Quinteiro [Tue, 2 Dec 2014 13:25:56 +0000 (14:25 +0100)]
gio: provide G_IO_ERROR_NOT_CONNECTED translation for ENOTCONN
https://bugzilla.gnome.org/show_bug.cgi?id=741016
Ignacio Casal Quinteiro [Tue, 2 Dec 2014 13:29:11 +0000 (14:29 +0100)]
gio: fix build
next time I should definitely try to compile after a rebase conflict...
Ignacio Casal Quinteiro [Tue, 2 Dec 2014 12:50:51 +0000 (13:50 +0100)]
gio: add G_IO_ERROR_NOT_CONNECTED
It adds a new error G_IO_ERROR_NOT_CONNECTED
and makes the win32 error ERROR_PIPE_LISTENING
to be translated to it.
https://bugzilla.gnome.org/show_bug.cgi?id=741016
Rico Tzschichholz [Mon, 1 Dec 2014 13:16:54 +0000 (14:16 +0100)]
docs: Add index for 2.44 api
Trần Ngọc Quân [Mon, 1 Dec 2014 02:07:13 +0000 (09:07 +0700)]
Updated Vietnamese translation
Signed-off-by: Trần Ngọc Quân <vnwildman@gmail.com>
Dan Winship [Fri, 19 Aug 2011 14:23:12 +0000 (10:23 -0400)]
gsocket: add G_IO_ERROR_CONNECTION_CLOSED
Add G_IO_ERROR_CONNECTION_CLOSED as an alias for
G_IO_ERROR_BROKEN_PIPE, and also return it on ECONNRESET.
It doesn't really make sense to try to distinguish EPIPE and
ECONNRESET at the GLib level, since the exact choice of which error
gets returned in what conditions depends on the OS. Given that, we
ought to map the two errors to the same value, and since we're already
mapping EPIPE to G_IO_ERROR_BROKEN_PIPE, we need to map ECONNRESET to
that too. But the existing name doesn't really make sense for sockets,
so we add a new name.
https://bugzilla.gnome.org/show_bug.cgi?id=728928
Dan Winship [Sun, 23 Nov 2014 17:53:03 +0000 (12:53 -0500)]
gnetworkaddress: Add g_network_address_new_loopback() constructor
This is a convenience method for creating a GNetworkAddress which is
guaranteed to return IPv4 and IPv6 loopback addresses. The program
cannot guarantee that 'localhost' will resolve to both types of
address, so programs which wish to connect to a local service over
either IPv4 or IPv6 must currently manually create an IPv4 and another
IPv6 socket, and detect which of the two are working. This new API
allows the existing GSocketConnectable machinery to be used to
automate that.
Based on a patch from Philip Withnall.
https://bugzilla.gnome.org/show_bug.cgi?id=732317
Ryan Lortie [Fri, 28 Nov 2014 22:55:28 +0000 (17:55 -0500)]
GVariant tests: test with larger strings
Allocate some larger strings in the testcase to make sure we handle them
correctly as well.
Ryan Lortie [Fri, 28 Nov 2014 17:43:03 +0000 (12:43 -0500)]
gmain: fix poll record comparison
We intend to keep the list of poll records sorted by (integer) file
descriptor, but due to a typo we are actually keeping it sorted by
pointer address of the GPollFD.
Fix that.
https://bugzilla.gnome.org/show_bug.cgi?id=11059
Ryan Lortie [Fri, 28 Nov 2014 21:20:40 +0000 (16:20 -0500)]
gsignal: add a clarification to the docs
As evidenced by a mistake that I made recently, this documentation could
use a little bit of clarification.
Lars Uebernickel [Fri, 28 Nov 2014 12:06:04 +0000 (13:06 +0100)]
GSettings: fix check for delaying backend subscription
g_settings_has_signal_handlers() checks whether any of the signals has
pending handlers. However, g_signal_has_handler_pending() matches on
exact detail, even when passing 0. Subscribing to one of GSettings'
signals with a detail will fail this check and never connect to the
backend.
Fix this by calling has_handler_pending() with the key as detail as
well.
https://bugzilla.gnome.org/show_bug.cgi?id=740848
Matthias Clasen [Thu, 27 Nov 2014 14:12:42 +0000 (09:12 -0500)]
Use the new g_strv_contains
No need to keep our own copy of this in the testsuite.
Xavier Claessens [Mon, 15 Apr 2013 12:54:31 +0000 (14:54 +0200)]
gstrfuncs: Add g_strv_contains()
Includes unit tests.
https://bugzilla.gnome.org/show_bug.cgi?id=685880
Philippe Coval [Wed, 26 Nov 2014 11:11:00 +0000 (12:11 +0100)]
packaging: Bump to 2.43.1
Change-Id: Id068a8288f85baef2ffada606d10bcb2dbf78cf4
Bug-Tizen: TC-2124
Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
Philippe Coval [Wed, 26 Nov 2014 11:03:56 +0000 (12:03 +0100)]
packaging: Bump to 2.40.1
Change-Id: I23e399e680e58b26358c00e15cd4325c5eb08338
Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
Philippe Coval [Tue, 1 Apr 2014 14:46:03 +0000 (16:46 +0200)]
packaging: Bump to 2.40.0
Change-Id: I6d64c12841cc6d0c536e27f1f3d69ec3a675d7d6
Bug-Tizen: PTREL-773
Bug-Tizen: TIVI-2898/part
Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
Anas Nashif [Tue, 13 Aug 2013 15:21:17 +0000 (11:21 -0400)]
add .gbs.conf and update to 2.36.4
Change-Id: I0540f90b0b0ba28680cd5ae1d5186d07be078e61
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Alexandru Cornea [Fri, 28 Jun 2013 20:11:14 +0000 (23:11 +0300)]
resetting manifest requested domain to floor
Philippe Coval [Fri, 19 Jul 2013 13:00:32 +0000 (15:00 +0200)]
changes: Bug-Tizen: TZPC-3317 (... remove the fav apps icon ...)
Conflicts:
packaging/glib2.changes
Anas Nashif [Tue, 13 Aug 2013 15:18:01 +0000 (11:18 -0400)]
Remove empty docs package
Anas Nashif [Tue, 13 Aug 2013 14:06:17 +0000 (10:06 -0400)]
remove docs package
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Anas Nashif [Sat, 27 Apr 2013 12:37:34 +0000 (05:37 -0700)]
Update to 2.36.1
Anas Nashif [Wed, 27 Mar 2013 16:05:31 +0000 (09:05 -0700)]
Update to 2.36.0
Anas Nashif [Fri, 22 Mar 2013 18:22:23 +0000 (11:22 -0700)]
Update to 2.35.9
Anas Nashif [Tue, 5 Mar 2013 09:10:41 +0000 (01:10 -0800)]
Remove previous crash fix (TZPC-453)
Anas Nashif [Tue, 26 Feb 2013 14:36:06 +0000 (06:36 -0800)]
Update to 2.35.8
Anas Nashif [Tue, 26 Feb 2013 14:30:35 +0000 (06:30 -0800)]
Update to 2.35.8
Anas Nashif [Thu, 7 Feb 2013 20:18:02 +0000 (12:18 -0800)]
Update to 2.35.7
Anas Nashif [Thu, 7 Feb 2013 20:17:15 +0000 (12:17 -0800)]
cleanup spec file
Anas Nashif [Thu, 31 Jan 2013 16:51:26 +0000 (08:51 -0800)]
Update to 2.35.4
Anas Nashif [Tue, 15 Jan 2013 15:00:05 +0000 (07:00 -0800)]
Update to 2.35.4
Anas Nashif [Tue, 5 Mar 2013 09:08:42 +0000 (01:08 -0800)]
split commit
Anas Nashif [Tue, 18 Dec 2012 20:46:15 +0000 (12:46 -0800)]
update to 2.35.3
Anas Nashif [Mon, 10 Dec 2012 03:12:39 +0000 (19:12 -0800)]
add changelog
Anas Nashif [Mon, 10 Dec 2012 02:55:35 +0000 (18:55 -0800)]
package license file
Anas Nashif [Mon, 10 Dec 2012 01:03:26 +0000 (17:03 -0800)]
add codegen to %files
Anas Nashif [Mon, 10 Dec 2012 00:55:22 +0000 (16:55 -0800)]
BR glibc-devel
Anas Nashif [Thu, 20 Dec 2012 21:10:25 +0000 (13:10 -0800)]
adapt %files section
Anas Nashif [Tue, 4 Dec 2012 15:41:21 +0000 (07:41 -0800)]
update to 2.35.2
Anas Nashif [Tue, 4 Dec 2012 14:39:56 +0000 (06:39 -0800)]
cleanup %files
Anas Nashif [Tue, 4 Dec 2012 14:35:38 +0000 (06:35 -0800)]
cleanup %files
Anas Nashif [Tue, 4 Dec 2012 14:31:13 +0000 (06:31 -0800)]
run autogen
Anas Nashif [Tue, 4 Dec 2012 13:59:21 +0000 (05:59 -0800)]
add packaging
Matthias Clasen [Mon, 24 Nov 2014 18:07:22 +0000 (13:07 -0500)]
2.43.1
Dan Winship [Sun, 23 Nov 2014 17:33:01 +0000 (12:33 -0500)]
gio/tests: add a socket-listener test
Add a GSocketListener test program. Currently the only test is a
regression test for bug 712570 (based on a standalone bug reproducer
provided by Ross Lagerwall).
Ross Lagerwall [Tue, 28 Oct 2014 21:16:50 +0000 (21:16 +0000)]
gio: Prevent hang when finalizing GThreadedSocketService
If all users of a GThreadedSocketService release their references to the
service while a connection thread is running, the thread function will
release the last reference to the service which causes the finalize to
deadlock waiting for all threads to finish (because it's called from the
thread function).
To fix this, don't wait for all threads to finish in the service's
finalize method. Since the threads hold a reference to the service,
finalize should only be called when all threads are finished running (or
have unrefed the service and are about to finish).
https://bugzilla.gnome.org/show_bug.cgi?id=712570
Jasper St. Pierre [Tue, 28 Oct 2014 20:45:34 +0000 (13:45 -0700)]
gparam: Make the documentation clearer for CONSTRUCT_ONLY properties
It's not that the properly will only be set on construction, it's that
it *can* only be set upon construction.
Michael Henning [Wed, 5 Nov 2014 06:20:25 +0000 (01:20 -0500)]
gio: Implement g_win32_app_info_launch_uris for windows.
Michael Henning [Wed, 5 Nov 2014 06:18:25 +0000 (01:18 -0500)]
gio: Implement g_app_info_get_default_for_uri_scheme for windows.
Dan Winship [Sat, 22 Nov 2014 15:54:41 +0000 (10:54 -0500)]
GTlsClientConnection: loosen the semantics of "use-ssl3"
If SSL 3.0 has been disabled (at the host, application, or library
level), then the "use-ssl3" property becomes a "fail-immediately"
property.
Despite the name, the point of the property wasn't really specifically
to use SSL 3.0; it was to allow fallback when talking to broken
servers that do SSL/TLS negotiation incorrectly and break when they
see unexpectedly-high version numbers. So if we can't fall back to SSL
3.0, then the "use-ssl3" property should fall back to TLS 1.0 instead
(since there are hosts that will reject a TLS 1.2 handshake, but
accept a TLS 1.0 one).
glib-networking is being updated to implement that behavior, so update
the documentation here.
https://bugzilla.gnome.org/show_bug.cgi?id=738633
Chun-wei Fan [Thu, 20 Nov 2014 10:34:21 +0000 (18:34 +0800)]
GSettings Registry Backend: Init cache_lock Earlier
In commit 8ff5668, we are subscribing the GSettings backend later, but this
meant that we need to initialize cache_lock earlier, as we might try to
use that lock before a change notification is issued to subscribe the
backend, which would then cause an access violation if we are trying to
read GSettings values, as that lock is used to access the Windows Registry.
Initialize cache_lock once we initialize the GSettings Registry backend,
and delete it upon finalize, so that g_settings_read_from_backend() can
proceed normally, even if the GSettings backend is not yet subscribed.
https://bugzilla.gnome.org/show_bug.cgi?id=740413
Christian Persch [Tue, 23 Sep 2014 08:46:53 +0000 (10:46 +0200)]
gsettingsschema: Print the string that failed to parse
When parsing a translated value fails, print the actual string that
failed to parse instead of the 'domain\004string' untranslated string.
https://bugzilla.gnome.org/show_bug.cgi?id=737150
https://bugzilla.gnome.org/show_bug.cgi?id=737160
Ryan Lortie [Sat, 26 Jul 2014 15:16:37 +0000 (17:16 +0200)]
GSettings: delay backend subscription
GSettings objects begin watching for changes as soon as they are created
in order that they can emit the "changed" signal.
In the case of dconf, if we want to be able to emit the changed signal,
we need to go on the bus and add some match rules. This requires
creating the dconf helper thread and also requires initialising GDBus
(which creates another thread).
Some users of GSettings are never interested in the "changed" signal.
One of these users is the glib-networking code that gets run every time
a new network connection is created.
Some users are reporting that they are annoyed that simply establishing
a network connection would spawn two extra threads and create a D-Bus
connection.
In order to avoid doing unnecessary work for these simple uses, delay
the subscription until we know that we will actually need to do it.
We do this in a simple way, using a simple argument: in order for the
user to care that a value changed then they must have:
1) watched for a change signal; and then
2) actually read a value
If the user didn't actually read a value then they cannot possibly be
interested in if the value changed or not (since they never knew the old
value to begin with and therefore would be unable to observe that it
ever changed, since they have nothing to compare the new value with).
This really is a behaviour change, however, and it does impact at least
one user: the 'monitor' functionality of the GSettings commandline tool,
which is interested in reporting changes without ever having known the
original values. We add a workaround to the commandline tool in order
to ensure that it continues to function properly.
It's also possible to argue that it is completely valid to have read a
value and _then_ established a change signal connection under the
(correct) assumption that it would not have been possible to miss a
change signal by virtue of not having returned to the mainloop.
Although this argument is true, this pattern is extremely non-idiomatic,
and the problem is easily avoided by doing things in the usual order.
We never really talked about change notification in the overview
documentation for GSettings, so it seems like now is a good time to add
some discussion, including the new rules for when one can expect change
signals to be emitted.
https://bugzilla.gnome.org/show_bug.cgi?id=733791
Alberto Ruiz [Tue, 18 Nov 2014 14:43:41 +0000 (14:43 +0000)]
glib: Improve documentation for g_strfreev()
Fixes #740309.
Kjartan Maraas [Sat, 15 Nov 2014 17:31:40 +0000 (18:31 +0100)]
Updated Norwegian bokmål translation.
Lars Uebernickel [Sat, 15 Nov 2014 09:30:41 +0000 (10:30 +0100)]
gapplication: enable --help when app has options
This should already work according to the documentation, but doesn't
because main_options is consumed before the check in
g_application_parse_command_line().
Fix by moving the check for main_options up.
https://bugzilla.gnome.org/show_bug.cgi?id=740157
David King [Thu, 13 Nov 2014 17:49:31 +0000 (17:49 +0000)]
docs: Add missing opening parenthesis
https://mail.gnome.org/archives/gnome-web-list/2014-November/msg00003.html
Volker Sobek [Fri, 23 May 2014 20:45:30 +0000 (22:45 +0200)]
docs: Update GParamFlags docs.
Remove reference to G_PARAM_READWRITE from GParamFlags' description,
since commit
6c395244a5db added G_PARAM_READWRITE to GParamFlags.
https://bugzilla.gnome.org/show_bug.cgi?id=726037
Sébastien Wilmet [Wed, 5 Nov 2014 13:00:45 +0000 (14:00 +0100)]
Simplify code that uses g_queue_insert_before() and insert_after()
g_queue_insert_before() and g_queue_insert_after() now accept a NULL
sibling.
https://bugzilla.gnome.org/show_bug.cgi?id=736620
Sébastien Wilmet [Wed, 5 Nov 2014 13:03:30 +0000 (14:03 +0100)]
GQueue: accept a NULL sibling for insert_before() and insert_after()
It simplifies a little bit some code that inserts data relative to a
GList location, that might be NULL for the tail of the queue. A NULL
sibling is probably less useful for insert_after(), so it's more for
consistency with insert_before().
https://bugzilla.gnome.org/show_bug.cgi?id=736620
Chun-wei Fan [Mon, 3 Nov 2014 02:09:14 +0000 (10:09 +0800)]
gnetworking.h.win32: Move "#undef interface"
This is a follow-up commit due to the fix in gnetworking.h.in in commit
7103484 (gnetworking.h.in: move "#undef interface").
Dan Winship [Sun, 2 Nov 2014 14:36:14 +0000 (09:36 -0500)]
gnetworking.h.in: move "#undef interface"
The win32 headers do:
#define interface struct
which is just evil and breaks other code that assumes it can use
"interface" as a variable name. gnetworking.h was supposed to be doing
"#undef interface" after including the win headers, but it did it too
soon, resulting in it getting redefined by a later include. Fix this.
https://bugzilla.gnome.org/show_bug.cgi?id=738551
Dan Winship [Tue, 28 Oct 2014 19:08:43 +0000 (15:08 -0400)]
GTlsCertificate: fix loading of bad certificate chains
g_tls_certificate_new_from_file() was only loading the complete chain
if it was fully valid, but we only meant to be validating that it
formed an actual chain (since the caller may be planning to ignore
other errors).
https://bugzilla.gnome.org/show_bug.cgi?id=729739
Ross Lagerwall [Mon, 8 Sep 2014 20:09:08 +0000 (21:09 +0100)]
doc: Clarify documentation regarding g_file_replace and etags
Clarify that with g_file_replace, a non-NULL etag is only checked if the
file already exists.
https://bugzilla.gnome.org/show_bug.cgi?id=736286
Ross Lagerwall [Wed, 29 Oct 2014 22:12:39 +0000 (22:12 +0000)]
gio: Prevent hang writing to a large GMemoryBuffer
Fix a hang due to overflow by using unsigned numbers and explicitly
checking if the number overflows to zero. This also fixes the previous
logic which assigned an int which may be negative to an unsigned number
resulting in sign extension and strange results.
Use gsize rather than int to allow for large buffers on 64 bit machines.
https://bugzilla.gnome.org/show_bug.cgi?id=727988
Ross Lagerwall [Wed, 29 Oct 2014 22:05:32 +0000 (22:05 +0000)]
gio: Prevent hang writing to a large GMemoryOutputStream
Fix a hang due to overflow by using unsigned numbers and explicitly
checking if the number overflows to zero. This also fixes the previous
logic which assigned an int which may be negative to an unsigned number
resulting in sign extension and strange results.
Use gsize rather than int to allow for large streams on 64 bit machines.
https://bugzilla.gnome.org/show_bug.cgi?id=727988
Dan Winship [Tue, 13 Mar 2012 15:43:38 +0000 (11:43 -0400)]
gmain: don't pass the same fd to g_poll() multiple times
If a given fd is being polled by multiple sources, we used to pass it
multiple times to g_poll(), which is technically illegal (and not
supported by the select()-based fallback implementation of poll() in
gpoll.c), and also made it more likely that we'd exceed the maximum
number of pollfds.
Fix it to merge together "duplicate" GPollFDs. The easiest way to do
this involves re-sorting context->poll_records into fd order rather
than priority order. This means we now have to walk the entire pollrec
list for every g_main_context_query() and g_main_context_poll(),
rather than only walking the list up to the current max_priority.
However, this will only have a noticeable effect if you have tons of
GPollFDs, and we're already too slow in that case anyway because of
other O(n) operations that happen too often. So this shouldn't change
much (and the new poll API will eventually let us be cleverer).
Remove some win32-specific code which did the same thing (but was
O(n^2)).
https://bugzilla.gnome.org/show_bug.cgi?id=11059
Owen W. Taylor [Thu, 9 Oct 2014 18:40:45 +0000 (14:40 -0400)]
GDBusInterfaceVTable: clarify memory handling for the method() virtual function
There are two consistent interpretations that could be taken for memory
handling of the 'invocation' parameter passed to the method_call() virtual
function of GDBusInterfaceVTable
- A reference is passed (transfer full) to the method_call() virtual function,
and that reference is then passed (transfer full) to the return_value/error
functions on GDBusMethodInvocation.
- An internal reference is retained from the point where method_call() is called
until the return_value/error function is called.
Since the return_value/error functions were already marked (transfer full),
we use the first interpretation, annotate the invocation parameter of
method call as (transfer full) and describe this in the documentation, along
with the idea that you are always supposed to call one of the return_value/error
functions.
See bug 738122 for the leak this caused in GJS.
https://bugzilla.gnome.org/show_bug.cgi?id=738259