16963 Commits

Author SHA1 Message Date
Matthias Clasen
8ef5eae694 2.52.1 2.52.1 2017-04-08 01:55:00 -04:00
Philip Withnall
35060eb9ae gfileutils: Add precondition checks to g_file_test()
Otherwise g_file_test(NULL, …) causes a call to access(NULL, …) on
Linux, which is disallowed and valgrind complains about it.

https://bugzilla.gnome.org/show_bug.cgi?id=755046
2017-04-08 01:47:34 -04:00
Ole André Vadla Ravnås
632a224cab gdbus: fix false positive g_warning() in remove_filter()
The GDBus thread might be holding a ref while requesting to remove the
filter.

https://bugzilla.gnome.org/show_bug.cgi?id=779409
2017-04-08 01:47:23 -04:00
Adrian Perez de Castro
4d1d5b4544 Better documentation for g_app_info_equal()
Explicitly state that the function may not compare the contents of the
passed GAppInfo instances.

This fixes bug #777961.
2017-04-08 01:47:11 -04:00
Alexandros Frantzis
13b67ea290 gdbus: Fix memory leak in gdbusmethodinvocation.c
https://bugzilla.gnome.org/show_bug.cgi?id=780924
2017-04-08 01:46:55 -04:00
Philip Withnall
6d56878b75 gvariant: Minor documentation tweak for g_variant_get_fixed_array()
Add a missing clausal comma, and add some backtick formatting.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-04-08 01:46:44 -04:00
Debarshi Ray
c3f555b69e docs: Clarify the use of the GError in g_tls_database_verify_chain*
Being able to determine that a certificate chain is invalid is not
considered an error, but success. This might not be obvious at first
due to the way the method is named and described currently. Since we
cannot change the name, let's improve the description and clarify this
aspect of its behaviour.

https://bugzilla.gnome.org/show_bug.cgi?id=780310
2017-04-08 01:46:34 -04:00
Philip Withnall
f7ca0a197e gio: Handle NULL cached properties in NetworkManager monitor
g_dbus_proxy_get_cached_property() and
g_dbus_proxy_get_cached_property_names() can both return NULL if the
property cache is empty. Avoid a crash if this situation arises (which
it looks like it could, from reading the code) by gracefully bailing out
on NULL return values.

Coverity issues: #1257044, #1257045

https://bugzilla.gnome.org/show_bug.cgi?id=741229
2017-04-08 01:46:12 -04:00
Philip Withnall
20fcc2d1cb gsocket: Fix potential multiplication overflow calculating timeout
socket->priv->timeout is only a guint, and the multiplication is
performed before it’s widened to gint64 to be stored in start_time
(thanks, C). This means any timeout of 50 days or more would overflow.
Fixing this bug makes me feel a real sense of self-worth.

Coverity ID: 1159478

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-04-08 01:46:05 -04:00
Philip Withnall
b010caeca8 build: Include gettext libraries for static compilation on Mac OS X
When compiling statically against the system-provided gettext on Mac OS
X, GLib needs to be linked against CoreFramework, which provides some
functions used by gettext.

Fix this by including the necessary macro magic from upstream gettext.

https://bugzilla.gnome.org/show_bug.cgi?id=725894
2017-04-08 01:45:37 -04:00
Colin Walters
2a38996618 gdbusprivate: Include a few headers to fix win32 build
Followup to previous commit.

See: https://bugzilla.gnome.org/show_bug.cgi?id=674885
2017-04-08 01:44:27 -04:00
Colin Walters
4367515d06 gdbus: Initialize types earlier to break proxy <-> connection deadlock
This will help us break generic GType deadlocks between people using
GDBus in different threads (which is supported), not just by GType
usage in the GDBus thread.

This should fix the common cases we're seeing in the wild, although I
have some lingering concerns that if someone e.g. referenced
e.g. `G_TYPE_DBUS_AUTH_MECHANISM_SHA1` etc. we'd need to add those
too.

https://bugzilla.gnome.org/show_bug.cgi?id=674885
2017-04-08 01:44:19 -04:00
INSUN PYO
7725280cbf gdbus: Initialize types at async entrypoints
This isn't a comprehensive fix, but should cover a lot of cases
for GDBus.

https://bugzilla.gnome.org/show_bug.cgi?id=674885
2017-04-08 01:44:12 -04:00
Patrick Griffis
2f2100433f gosxcontenttype: Fix various tests
https://bugzilla.gnome.org/show_bug.cgi?id=780384
2017-04-08 01:44:06 -04:00
Patrick Griffis
36f32134be build: Skip gdesktopappinfo tests on OSX
https://bugzilla.gnome.org/show_bug.cgi?id=780384
2017-04-08 01:43:59 -04:00
Philip Withnall
2d0b6c2b86 gmessages: Don’t check G_MESSAGES_DEBUG in old logging API
Now that the old logging API forwards through to the new structured
logging API, we don’t need to check the level or domain of a message
against INFO_LEVELS or G_MESSAGES_DEBUG — just pass it straight through
to the new structured logging API writer function.

https://bugzilla.gnome.org/show_bug.cgi?id=775879
2017-04-08 01:43:36 -04:00
Marc-André Lureau
082343f802 gio-querymodules: fix memory leak
Spotted thanks to ASAN.

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

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2017-04-08 01:43:23 -04:00
Philip Withnall
ad1040ed0c ghash: Document order of parameters in GEqualFunc usage
See https://bugzilla.gnome.org/show_bug.cgi?id=698064#c15.
2017-04-08 01:43:15 -04:00
Philip Withnall
2ea36106b7 ghash: Fix gtk-doc syntax in a documentation comment 2017-04-08 01:43:07 -04:00
Philip Withnall
5596bfb71e gbase64: Fix base-64 stepped encoding with small chunks
If encoding with small chunks such that the call to
g_base64_encode_close() has to deal with 0 < x < 24 bits of remaining
state, the encoding code would not correctly use zeroes to pad out the
state — it would use left-over state from an earlier iteration in the
encoding process.

This resulted in invalid base-64 encodings.

Add a unit test for incremental encoding using different sized chunks
too.

Thanks to Rainier Perske for reporting and analysing the bug.

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

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-04-08 01:42:58 -04:00
Philip Withnall
e7fc0bf389 gmain: Document that set_ready_time() is safe on destroyed GSources
Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=778049
2017-04-08 01:42:49 -04:00
Philip Withnall
e6dddc3636 gmain: Document threading properties of g_source_is_destroyed()
https://bugzilla.gnome.org/show_bug.cgi?id=778049
2017-04-08 01:42:40 -04:00
Philip Withnall
e4ce400e8f gio: Drop redundant g_source_is_destroyed() calls
These calls cause race warnings from tsan, but are not a thread safety
problem, because we can only ever observe single bit changes: all
modifications to the GSource.flags field are done with a lock held; all
reads are of independent fields, so no intermediate state can ever be
observed. This assumes that a non-atomic read will consistently give us
an old value or a new value.

In any case, these g_source_is_destroyed() calls can happen from any
thread, and the state could be changed from another thread immediately
after the call returns; so the checks are pointless. In addition,
calling g_source_set_ready_time() or g_source_destroy() on a destroyed
source is not a problem.

https://bugzilla.gnome.org/show_bug.cgi?id=778049
2017-04-08 01:41:05 -04:00
Philip Withnall
f46cbf6b08 gmodule: Add the visibility attribute to G_MODULE_EXPORT on gcc
For versions of GCC which support it (≥ 4), define G_MODULE_EXPORT as
__attribute__((visibility("default"))). This is normally a no-op, unless
compiling with -fvisibility=hidden, in which case it marks a symbol to
be publicly exported from the library, which is what G_MODULE_EXPORT is
for. Previously G_MODULE_EXPORT has only worked on Windows.

The compatibility check for whether the compiler supports
__attribute__((visibility)) is based on the __GNUC__ define, and is
similar to the check done in configure.ac for defining G_GNUC_INTERNAL.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=778287
2017-04-08 01:40:49 -04:00
Mario Sanchez Prada
261de46cca appinfo: Don't hardcode strings for the OpenURI portal's D-Bus method
We added several #define in the previous commit, so use those instead.
2017-04-08 01:40:34 -04:00
Mario Sanchez Prada
49cdd2a3aa appinfo: Launch the OpenURI portal using a synchronous D-Bus call
Calling the D-Bus method for the OpenURI portal "protects" the logic from
not ever having the remote method running in case the xdg-desktop-portal
process is not yet running and the caller quits quickly after the call.

This should not be a problem as the method returns immediately (regardless
of the user making a selection), but making it synchronous would prevent
situations where the OpenURI method would never be called because of D-Bus
dropping the message after the caller dies, without explicitly waiting for
a reply.

https://bugzilla.gnome.org/show_bug.cgi?id=780441
2017-04-08 01:40:24 -04:00
Mario Sanchez Prada
50960f80ce appinfo: Don't leak the session bus in launch_default_with_portal_async
The session bus object needs to be unreferenced before early returning.
2017-04-08 01:39:56 -04:00
Daniel Macks
34c7541edc Do not build utf8_encode on CARBON platform
utf8_encode is not used by g_utf8_collate_key on this platform.

https://bugzilla.gnome.org/show_bug.cgi?id=780306
2017-04-08 01:39:47 -04:00
Philip Withnall
25f12a54d2 gutf8: Clarify documentation for g_utf8_get_char_validated()
There is no such thing as ‘no maximum’ when reading a string. It’s got
to end somewhere.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=780095
2017-04-08 01:39:33 -04:00
Philip Withnall
d5cd8322cc gutf8: Clarify return values from g_utf8_get_char_extended()
It’s hard to remember what the difference is between -1 and -2, so give
them names.

This introduces no functional changes.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=780095
2017-04-08 01:39:24 -04:00
Chun-wei Fan
865ef86d8f Visual Studio 201x builds: Fix GIO x64 Debug builds
The custom build rules did not have rules for x64 Debug builds during
the refactoring.  Fix this by removing all Platform and Configuration
conditions for it, since this is done on are configs in the same manner.

Noted by Ignacio Casal Quinteiro.
2017-04-05 00:19:57 +08:00
Stas Solovey
8c9d02acb7 Update Russian translation 2017-04-03 19:10:29 +00:00
Florian Müllner
6d05094462 appinfo: Only use portal as fallback
We currently assume that the OpenURI portal should be used
unconditionally when running inside a flatpak sandbox. While
the portal is what we usually want, there are exceptions:
Yelp is now included in the GNOME runtime to allow displaying
help without exporting the user documentation, and the sandboxed
app itself may register a scheme handler.
To account for those cases transparently, always try the normal
code path first and only fall back to calling the portal when
that fails.

https://bugzilla.gnome.org/show_bug.cgi?id=780471
2017-03-31 15:12:15 +02:00
Fabio Tomat
d04acd6231 Update Friulian translation 2017-03-31 08:09:50 +00:00
Yosef Or Boczko
e0c5dd7d7f Updated Hebrew translation 2017-03-30 19:31:47 +03:00
Yosef Or Boczko
8407d6bd1d Updated Hebrew translation 2017-03-30 17:58:56 +03:00
Christoph Reiter
311d740f90 gosxappinfo: fix typo in url_escape_hostname
This duplicated everything after the hostname.

https://bugzilla.gnome.org/show_bug.cgi?id=734946
2017-03-30 10:24:30 -04:00
Patrick Griffis
c1f7e0eb78 gosxappinfo: Fix launching default applications
https://bugzilla.gnome.org/show_bug.cgi?id=734946
2017-03-30 10:24:24 -04:00
Piotr Drąg
bf7dc9edd3 Update Polish translation 2017-03-25 19:38:29 +01:00
Andika Triwidada
30e382bace Update Indonesian translation 2017-03-19 08:07:48 +00:00
Matthias Clasen
bce36c2d46 2.52.0 2.52.0 2017-03-18 20:40:40 -04:00
Philip Withnall
e6e38f4b8a gbase64: Document that g_base64_encode_close() does not nul-terminate
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-03-17 11:33:13 +00:00
Colin Walters
dd914da1c8 gio/fam: Remove leftover debug print
This leftover debug print was introduced by d682df186e
and is obviously bad for applications that are expecting something
else on stdout, etc.

See: https://bugzilla.redhat.com/show_bug.cgi?id=1396386

https://bugzilla.gnome.org/show_bug.cgi?id=780144
2017-03-16 10:36:17 -04:00
Philip Withnall
2411b76c5e docs: Fix some DocBook usage in a few gtk-doc comments
<emphasis> and <ulink> tags. Replace them with Markdown.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-03-16 13:50:19 +00:00
Claude Paroz
3a1e98cca8 Updated French translation 2017-03-16 10:04:35 +01:00
Rūdolfs Mazurs
5ebfb179b9 Update Latvian translation 2017-03-15 21:24:01 +02:00
Iain Lane
ec02a1875f tests/gdatetime: Use a real rather than invented timezone
The tzdata maintainers had previously invented abbreviations for
timezones. As of their 2017a release, the one we were testing ("BRT")
has been dropped.

Switch to testing PST, which is a real timezone abbreviation.

https://bugzilla.gnome.org/show_bug.cgi?id=779799
2017-03-15 11:06:55 +00:00
Fabio Tomat
567f01044f Update Friulian translation 2017-03-15 04:47:21 +00:00
Piotr Drąg
e9fe8868a7 Use single non-Unicode quotation marks in a new translatable message
Actually, Unicode changes to this file got reverted in
2d56c49b10. Also, there is
"No such interface '%s'" string already, so we avoid
breaking the string freeze.
2017-03-14 14:51:49 +01:00
Piotr Drąg
bb93f3a4aa Use consistent quotation marks in a new translatable message
Double quotation marks are used everywhere else in glib, as per
<https://developer.gnome.org/hig/stable/typography.html>.
2017-03-14 14:45:48 +01:00