Commit Graph

4771 Commits

Author SHA1 Message Date
Patrick Griffis
79c08255be gdbus-codegen: Fix -Wconversion warning
https://bugzilla.gnome.org/show_bug.cgi?id=778581
2017-02-14 14:06:38 -05:00
Matthew Leeds
442d64ba94 gsubprocesslauncher: Clarify the behavior of set_environ()
GNOME Builder's code was assuming that setting the launcher's
environ to NULL makes the subprocess have an empty environment, but in
fact the parent process's variables are still inherited because execv is
used instead of execve when envp is NULL. This commit clarifies the
documentation to make the behavior clear.

https://bugzilla.gnome.org/show_bug.cgi?id=778422
2017-02-13 09:44:10 -06:00
Ondrej Holy
006a7d082b fileinfo: Add G_FILE_ATTRIBUTE_RECENT_MODIFIED attribute
Add filesystem attribute to propagate time, when the metadata for the file
in "recent:///" was last changed. This attribute is needed for sorting
recent backend files in client applications.

https://bugzilla.gnome.org/show_bug.cgi?id=777507
2017-02-13 08:12:48 -05:00
Ondrej Holy
453957973b fileinfo: Use monospaced font for uris
Some uris are in quotes, some in backticks, let's unify it.

https://bugzilla.gnome.org/show_bug.cgi?id=777507
2017-02-13 10:26:52 +01:00
Philip Withnall
257aff6f60 docs: Fix a typo in a documentation string 2017-02-08 15:06:34 +00:00
Philip Withnall
78fba90f65 docs: Add links to D-Bus specification for D-Bus address format
In an attempt to clarify the format a little.
2017-02-08 15:06:23 +00:00
Philip Withnall
c131865f57 gdbus: Fix atomic accesses to global name watch ID
https://bugzilla.gnome.org/show_bug.cgi?id=777307
2017-02-05 14:59:44 +01:00
Fabrice Bellet
b1f14143e5 gdbus: make gdbusconnection ids thread-safe
To prevent a race where these global static counters can be
incremented by two threads concurrently.

https://bugzilla.gnome.org/show_bug.cgi?id=778096
2017-02-05 14:25:05 +01:00
Fabrice Bellet
c457ec053d gdbus: make sure to stay locked when sending message
This patch fixes a case where schedule_writing_unlocked() was called
without holding the write lock. The bug was introduced in commit
512e9b3b.

https://bugzilla.gnome.org/show_bug.cgi?id=778002
2017-02-05 14:20:06 +01:00
Piotr Drąg
79ce76021a Fix a translator comment
They need to be exactly one line above a string to show up in .po files.
2017-01-26 04:52:17 +01:00
Philip Withnall
95afbe1666 gfileinfo: Clarify units in documentation for file attributes
Clarify that the G_FILE_ATTRIBUTE_TIME_* attributes are all in seconds
(apart from the *_USEC ones, which are documented separately).
2017-01-24 12:52:24 +00:00
Philip Withnall
740007c11e gfileinfo: Fix an incorrect unit in the documentation
G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC is in microseconds, not
milliseconds.
2017-01-24 12:51:35 +00:00
Philip Withnall
a6e2213343 gdbus: Add example to docs for g_dbus_method_invocation_return_value()
Try to clarify that the variant passed to return_value() must be a
tuple.

https://bugzilla.gnome.org/show_bug.cgi?id=777592
2017-01-24 09:50:01 +00:00
Will Thompson
40cf271a77
goutputstream: docs: fix typos
"ouput" -> "output" (missing 't')
"asyncronous" -> "asynchronous" (missing 'h')

https://bugzilla.gnome.org/show_bug.cgi?id=777481
2017-01-19 08:33:58 +00:00
Bastien Nocera
3b5b5696ed gio: Bump copy buffer size to 256k by default
This is small enough that it shouldn't cause problems on most machines
we support, but big enough to increase throughput on a lot of devices
and network protocols.

Note that the actual value is 256k minus malloc overhead, so that it
fits nicely in a 256k block (as suggested by Alexander Larsson).

See https://bugzilla.gnome.org/show_bug.cgi?id=773632

https://bugzilla.gnome.org/show_bug.cgi?id=773823
2017-01-11 18:25:21 +01:00
Bastien Nocera
0106a6cd9e gio: Use heap-allocated buffer
As if we were to increase the buffer size, it would be a bit too big to
fit on the stack.

https://bugzilla.gnome.org/show_bug.cgi?id=773823
2017-01-11 18:19:14 +01:00
Chun-wei Fan
6dfc6fee7b Visual Studio builds: Move project files to win32/
It was suggested that the project files be moved here as we don't actually
need to go two directory layers from $(srcroot), and would help us to
standardize on things in the future across the board.
2017-01-09 14:00:46 +08:00
Sébastien Wilmet
6231b1abc9 License headers: replace current FSF address by a link to gnu.org
Even if the address is correct, it's far more convenient to have a link
to a website.

https://bugzilla.gnome.org/show_bug.cgi?id=776586
2017-01-04 19:12:57 +01:00
Sébastien Wilmet
f60590534d License headers: "the Gnome Library" -> "this library"
Harmonize a little the license headers. In most of the license headers
in GLib, it is "this library".

It is also what is explained at:
https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html#SEC4
"How to Apply These Terms to Your New Libraries"

https://bugzilla.gnome.org/show_bug.cgi?id=776586
2017-01-04 19:12:56 +01:00
Christian Hergert
83d6c38e0c subprocess: avoid infinite loop in verify_disposition()
When performing the verify and building the error string there were two
possibilities of an infinite loop. The first is the missing twos-complement
to unset the bit in the filtered flags. The second is the lack of handling
G_SUBPROCESS_FLAGS_NONE which can return a valid GFlagsValue (and cannot
unset the bit since the value is zero).

This walks all known values in the GSubprocessFlags type class and check
if they are set. This has the benefit that we don't call needless functions
which walk the same table as well as avoiding mutating values to build
the error string.

https://bugzilla.gnome.org/show_bug.cgi?id=775913
2017-01-03 15:49:05 -08:00
Bastien Nocera
2e26893bf8 resolver: Fix compilation
Problem introduced in commit 442b7ce.
2017-01-03 16:26:38 +01:00
Bastien Nocera
442b7ce899 resolver: Return error looking up invalid hostnames
Make g_resolver_lookup_by_name() and g_resolver_lookup_by_name_async()
error out when invalid hostnames are passed.

https://bugzilla.gnome.org/show_bug.cgi?id=772989
2017-01-03 14:35:52 +01:00
Bastien Nocera
5c566e435e httpproxy: Fix invalid request on invalid hostnames
When an invalid hostname is passed for connection, the
g_hostname_to_ascii() might fail when creating the request in
create_request(). Make sure that error is caught and reported rather
than passing "(null)" as the hostname of the site we want to connect to.

https://bugzilla.gnome.org/show_bug.cgi?id=772989
2017-01-03 14:35:52 +01:00
Ingo Brückl
731e7fea17 tests: Don't run tests requiring DBUS unconditionally
The tests defaultvalue, gdbus-peer and gdbus-unix-addresses will fail
without DBUS, so only run them in case we HAVE_DBUS_DAEMON.

Signed-off-by: Ingo Brückl <ib@wupperonline.de>

https://bugzilla.gnome.org/show_bug.cgi?id=767609
2016-12-27 20:13:46 +01:00
donadigo
ab70359bbf Fixed notify id in FDO notification backend
https://bugzilla.gnome.org/show_bug.cgi?id=775765
2016-12-07 12:39:25 -08:00
Ignacio Casal Quinteiro
4b98a79997 gioerror: make WSAESHUTDOWN an alias of G_IO_ERROR_CONNECTION_CLOSED
This fixes one of the assertions of the socket unit tests where
G_IO_ERROR_FAILED was returned instead of G_IO_ERROR_CONNECTION_CLOSED.
2016-12-07 08:47:00 +01:00
Sebastian Dröge
799f8dcd46 GSocket: Fix race conditions on Win32 if multiple threads are waiting on conditions for the same socket
WSAWaitForMultipleEvents() only returns for one of the waiting threads, and
that one might not even be the one waiting for the condition that changed. As
such, only let a single thread wait on the event and use a GCond for all other
threads.

With this it is possible to e.g. have an UDP socket that is written to from
one thread and read from in another thread on Win32 too. On POSIX systems this
was working before already.

https://bugzilla.gnome.org/show_bug.cgi?id=762283
2016-12-05 18:17:17 +02:00
Simon McVittie
663e12feca gdbus-serialization test: don't left-shift a negative number
-2LL<<34 is undefined, because left-shifting a negative number is
undefined (it was implementation-defined behaviour in C99, but
is formally undefined in C11). The undefined behaviour sanitizer
picks this up.

Signed-off-by: Simon McVittie <smcv@debian.org>
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=775510
Reviewed-by: Colin Walters
2016-12-02 19:10:41 +00:00
Simon McVittie
e5ed410c8c Avoid calling Standard C string/array functions with NULL arguments
glibc string.h declares memcpy() with attribute(nonnull(1,2)), causing
calls with NULL arguments to be treated as undefined behaviour.
This is consistent with ISO C99 and C11, which state that passing 0
to string functions as an array length does not remove the requirement
that the pointer to the array is a valid pointer.
gcc -fsanitize=undefined catches this while running OSTree's test suite.

Similarly, running the GLib test suite reports similar issues for
qsort(), memmove(), memcmp().

Signed-off-by: Simon McVittie <smcv@debian.org>
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=775510
Reviewed-by: Colin Walters
2016-12-02 19:10:39 +00:00
Ignacio Casal Quinteiro
463a863605 gdbusauth: fix crash when server data send returns NULL
_g_dbus_auth_mechanism_server_data_send may fail in which case
we would endup getting a NULL data. In this case we should not
try to encode the data and simply let the state machine to continue.
The auth mechanism will change internally to REJECTED so we just
need to continue the iteration.

https://bugzilla.gnome.org/show_bug.cgi?id=775309
2016-11-29 13:12:47 +01:00
Ignacio Casal Quinteiro
93179f10b8 dbusaddress: do not leak error on win32 code 2016-11-29 09:21:04 +01:00
Christian Hergert
18a33f72db introspection: use (nullable) or (optional) instead of (allow-none)
If we have an input parameter (or return value) we need to use (nullable).
However, if it is an (inout) or (out) parameter, (optional) is sufficient.

It looks like (nullable) could be used for everything according to the
Annotation documentation, but (optional) is more specific.
2016-11-22 14:14:37 -08:00
Christophe Fergeau
a4012abbdf gdbus: Fix leak in g_dbus_message_print()
This leak only happens when using G_DBUS_DEBUG=message or similar, but
it's nicer to be valgrind-clean even in these cases.

https://bugzilla.gnome.org/show_bug.cgi?id=736810
2016-11-22 15:01:31 -05:00
Lukasz Skalski
59a996db9b GDBusMessage: Fix segfault if DEBUG_SERIALIZER is enabled
https://bugzilla.gnome.org/show_bug.cgi?id=729730
2016-11-22 14:59:49 -05:00
Pavel Grunt
c99fe67817 gtask: Add guards for public functions
https://bugzilla.gnome.org/show_bug.cgi?id=769745
2016-11-22 13:23:25 -05:00
Ondrej Holy
b626a4677a gunixmounts: Fix crash if path doesn't exist
g_unix_mount_for segfaults for nonexistent paths. Return NULL if path
doesn't exist.

https://bugzilla.gnome.org/show_bug.cgi?id=772160
2016-11-22 13:21:36 -05:00
Debarshi Ray
00bf553a60 GDBusMethodInvocation: Clarify how the ownership is handled
https://bugzilla.gnome.org/show_bug.cgi?id=767952
2016-11-22 17:06:48 +01:00
Benjamin Otte
578b42a2f2 glib-compile-resources: Add suggested braces
... around empty body in an 'else' statement
2016-11-20 23:50:56 +01:00
Patrick Griffis
3a8ac6e221 glib-compile-resources: Escape file names in dependency file
https://bugzilla.gnome.org/show_bug.cgi?id=774368
2016-11-20 13:33:21 -05:00
Patrick Griffis
7a8cbc60a5 glib-compile-resources: Add --generate-phony-targets flag
This includes phony targets for each dependency in the the generated
dependency file which allows building with `ninja` which doesn't like
the phony targets[1] but also allows silencing `make` errors similar to
gcc's -MP option.

[1] - https://github.com/ninja-build/ninja/issues/1184

https://bugzilla.gnome.org/show_bug.cgi?id=774368
2016-11-20 13:33:21 -05:00
Petr Kulhavy
437474318f GSocket: do not process control messages if not requested by the user
If g_socket_receive_message_with_timeout() is called with messages ==
NULL set the msg_control buffer to empty to not request the control
messages from recvmsg() at all.

This completely disables the control message processing and reduces
overhead, which might be critical at high packet rate.

https://bugzilla.gnome.org/show_bug.cgi?id=774520
2016-11-20 11:09:45 -05:00
Philip Withnall
1f36189aa5 gapplication: Fix a typo in a documentation comment
It’s ‘D-Bus’, not ‘DBus’, ‘DBUS’, ‘D Bus’, ‘Dee Buss’ or ‘the bus’.
2016-11-08 21:13:45 +00:00
Patrick Griffis
d1763d899c Revert "glib-compile-resources: Output depfile in same directory as target"
This reverts commit 9006940de6.
2016-11-05 22:15:53 -04:00
Patrick Griffis
9006940de6 glib-compile-resources: Output depfile in same directory as target
https://bugzilla.gnome.org/show_bug.cgi?id=773437
2016-11-02 17:44:23 -04:00
Matthias Clasen
2d56c49b10 Partially revert 10c490cdfe
This commit broke some tests, and I don't have the time
to fix up all the expected output, so I'll revert the changes
to the affected files for now.

This needs to be redone with the necessary test fixes.
2016-10-24 10:21:59 -04:00
Timm Bäder
f14389bec9 gapplication: Properly free the option_strings
option_strings gets set in g_application_add_main_option, so it can
contain elements independent from packed_options.

https://bugzilla.gnome.org/show_bug.cgi?id=773303
2016-10-24 06:10:57 -04:00
Patrick Griffis
243c1b7e84 glib-compile-resources: Fix creating depfile with other targets
Follow up to 87d76a5a9c from bug 745754

https://bugzilla.gnome.org/show_bug.cgi?id=773344
2016-10-24 01:41:57 -04:00
Sebastian Dröge
2a970e33a4 gresolver: Make get_default() thread-safe
https://bugzilla.gnome.org/show_bug.cgi?id=773262
2016-10-20 17:49:44 +03:00
Damien Lespiau
c494c3028c gfile: G_FILE_MONITOR_WATCH_MOVES was actually introduced in 2.46
I'm guessing the developments were done in 2.44 but the patches landed
after the 2.45.0 bump without an update to the Since tags.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>

https://bugzilla.gnome.org/show_bug.cgi?id=769630
2016-10-12 19:18:05 -04:00
Piotr Drąg
10c490cdfe Use Unicode in translatable strings
See https://developer.gnome.org/hig/stable/typography.html

https://bugzilla.gnome.org/show_bug.cgi?id=772221
2016-10-12 21:30:42 +02:00