10724 Commits

Author SHA1 Message Date
Cédric Valmary
440cc811d5 Update Occitan translation 2016-10-12 08:12:15 +00:00
OKANO Takayoshi
c2919ecb5a [l10n] Update Japanese translation 2012-04-12 09:30:05 +09:00
Will Thompson
421c37fcbb gdbus: test case for 673612
When presented with an array of empty arrays of 8-byte-aligned types,
GDBus would incorrectly apply the 8-byte alignment when reading back.

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

Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-04-10 16:51:01 -04:00
Will Thompson
7cfb607003 GDBusMessage: do not align for grandchildren of empty arrays.
D-Bus arrays are serialized as follows:

1. align to a 4-byte boundary (for the length)
2. uint32: the length of the serialized body in bytes
3. padding for the alignment of the body type (not included in the length)
4. the body.

Note that 3. is a no-op unless the body type is an 8-byte aligned type
(uint64, int64, double, struct, dict_entry), since you are always on a
4-byte boundary from aligning and writing the length.

So, an empty aax (that is, an array containing zero arrays of int64)
is serialized as follows:

1. align to a 4-byte boundary
2. length of the contents of this (empty) array, in bytes (0)
3. align to a 4-byte boundary (the child array's alignment requirement)
4. there is no body.

But previously, GDBus would recurse in step three to align not just for
the type of the child array, but for the nonexistent child array's
contents. This only affects the algorithm when the grandchild type has
8-byte alignment and the reader happened to not already be on an 8-byte
boundary, in which case 4 bytes were spuriously skipped.

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

Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-04-10 16:51:01 -04:00
Will Thompson
1c7b798635 GDBusMessage: print more debug info about alignment
Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-04-10 16:51:01 -04:00
Rajesh Ranjan
7179885605 hindi translation by Chandan Kumar 2012-03-27 12:20:34 +05:30
Matthias Clasen
2ce064df24 Bump version 2012-03-11 20:14:58 -04:00
Matthias Clasen
38dc56b5cd 2.30.3 2.30.3 2012-03-11 20:13:58 -04:00
Matthias Clasen
75f136ec77 Fix distcheck 2012-03-11 20:13:58 -04:00
Matthias Clasen
2fec30b203 Don't rely on /bin/sh
Another Fedora UsrMove victim !
2012-03-11 18:21:30 -04:00
Matthias Clasen
be130752b4 Fix binding properties of the same object
This problem was pointed out in bug 639873.
The patch here is based on Matt Barnes patch,
I've added a testcase as well.
2012-03-11 18:19:29 -04:00
Stefan Sauer
fa161472eb goption: try to be helpful in goption args/flag checks
When complaining about ill defined GOptionEntries include the name of the option
group and entry in the warning.
2012-03-11 18:19:29 -04:00
Filippo Della Betta
bf3b879af0 Added better support of G_STRFUNC for Visual Studio platform
https://bugzilla.gnome.org/show_bug.cgi?id=670128
2012-03-11 18:19:29 -04:00
Rui Matos
a30463de8a gvaluetransform: Fix an infinite loop with GFlagsValue sets with the 0 value
Transforming a GValue holding flags from a GFlagsValue set that includes the 0
value (no flag bits set) into a string would loop until exhausting all the
available memory.

https://bugzilla.gnome.org/show_bug.cgi?id=670557
2012-03-11 18:19:29 -04:00
Giovanni Campagna
14ddbfc62a GDataInputStream: don't segfault on async line reads
If an async line read fails, it returns NULL. In that case, we
must return NULL before validating the line, or we segfault.

https://bugzilla.gnome.org/show_bug.cgi?id=658484
2012-03-11 18:19:29 -04:00
Christophe Fergeau
125ceb1d44 Fix g_hash_table_foreach crash with NULL hash table
When G_DISABLE_ASSERT is not defined, g_hash_table_foreach and
g_hash_table_find dereferences the hash table argument before
checking if it's NULL. This causes a crash when one of this function
is mistakenly called with a NULL argument instead of returning
with a warning through g_return_if_fail.
2012-03-11 18:19:28 -04:00
Giovanni Campagna
649e3880b7 gtimezone: consider a leading : in TZ environment variable
When set to represent a zoneinfo file, TZ may start with :, therefore
glib needs to check it and ignore the first char when building the
resulting filename, or it won't be found.
Also, the path could be absolute, in which case it is wrong to
append /usr/share/timezone

https://bugzilla.gnome.org/show_bug.cgi?id=664237
2012-03-11 18:19:28 -04:00
Ravi Sankar Guntur
8ac2a93edc fix memory leak in g_bookmark_file_parse()
https://bugzilla.gnome.org/show_bug.cgi?id=669334

Signed-off-by: Ravi Sankar Guntur <ravi.g@samsung.com>
2012-03-11 18:19:28 -04:00
Antoine Jacoutot
0c550d4a61 goption: implement platform_get_argv0() for OpenBSD
https://bugzilla.gnome.org/show_bug.cgi?id=669024
2012-03-11 18:19:28 -04:00
Ryan Lortie
f6a7a70a1f GHash: add note about randomness in hashing
To clarify our statements about being robust against outside attackers
degrading the performance of your hashtable.
2012-03-11 18:19:28 -04:00
Matthias Clasen
1b7050d6a3 GHashTable: Add a note about hash collisions 2012-03-11 18:19:28 -04:00
Dan Winship
304595bc65 g_date_time_format: fix output in non-UTF-8 locales
In non-UTF-8 locales, the translations and nl_langinfo() return values
must be converted to UTF-8 before being returned to the caller.
Likewise, when making a recursive call to expand a format like '%x',
the format string must first be converted to UTF-8.

https://bugzilla.gnome.org/show_bug.cgi?id=668250
2012-03-11 18:19:21 -04:00
Víctor Manuel Jáquez Leal
02f5d4e13e build: link against gthread and gmodule
When cross-compiling with linaro toolchain 4.6.2, I got several
linking errors about missing symbols because a couple libraries are
not linked.

This patch adds to the LDADD flags the missed libraries.

This patch applies above the glib-2-30 branch.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>

https://bugzilla.gnome.org/show_bug.cgi?id=671711
2012-03-11 17:44:19 -04:00
Krishnababu Krothapalli
b299d20923 Updated Telugu Translations 2012-03-01 14:02:18 +05:30
John Ralls
8ec2b1a899 [Bug 529806] Cannot build in 64-bit Mac OS X due to libiconv 2012-02-24 17:12:06 -08:00
Peter Kjellerstedt
149a7d0a4d Do not fail unit test due to gdb abbreviating strings
gdb by default will only print strings up to 200 characters. After that
it abbreviates them. This affects the run-assert-msg-test.sh script if
the path to the glib installation is too long (in our case it was 133
characters, 132 would still have worked...)

By having gdb execute "set print elements 0" before printing the assert
string, the limit on maximum number of characters to print is set to
unlimited.

Signed-off-by: Peter Kjellerstedt <pkj@axis.com>

https://bugzilla.gnome.org/show_bug.cgi?id=670218
2012-02-18 19:20:59 -05:00
Javier Jardón
045f4f98e8 docs: Add win32 gio specific api to the docs 2012-02-07 16:04:42 +01:00
Swecha Localization Team
cf644d6b22 Updated Telugu Translation 2012-02-06 17:18:55 +05:30
Simon McVittie
ff9476df6a g_array_free, g_ptr_array_free: decrement refcount if not the last ref
foo_free is conceptually "worth" one unref; not decrementing the
refcount here means the GArray or GPtrArray wrapper (but not its
contents) would leak in the following call sequence:

    p = g_ptr_array_new ();
    g_ptr_array_ref (p);
    g_ptr_array_free (p, TRUE);
    g_ptr_array_unref (p);

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=666113
Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
2012-01-16 17:53:11 +00:00
Simon McVittie
e9aae873c6 GArray, GPtrArray: factor out the actual freeing
Depending how the array is freed, we may want to free the underlying
array (the "segment"), the struct wrapper or both.

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=666113
Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
2012-01-16 17:53:02 +00:00
Simon McVittie
e6b8a3da2a g_key_file_get_string_list: don't leak the pieces on error
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=666113
Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
2012-01-16 17:52:23 +00:00
Simon McVittie
78c358a48d g_data_set_internal: avoid use-after-free if datalist is in dataset
Removing the last thing in a dataset frees the dataset, and if the
datalist was in a dataset, we can't safely unlock it after the dataset
has been freed. Unlock it sooner.

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=666113
Reviewed-by: Matthias Clasen <mclasen@redhat.com>
2012-01-16 17:48:29 +00:00
Simon McVittie
7ddaec08f4 g_strcompress: check that source is non-NULL rather than just crashing
Calling this function with a NULL argument is considered to be invalid,
but one of the regression tests does it anyway (to watch it crash), which
seems a good indication that it's expected to be somewhat common.
Let's check it rather than segfaulting.

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=666113
Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
Reviewed-by: Matthias Clasen <mclasen@redhat.com>
2012-01-16 17:48:21 +00:00
Simon McVittie
43c18ec739 GKeyFile: free group comments when the group is removed
These were leaked. Valgrind was sad.

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=666113
Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
2012-01-16 17:48:01 +00:00
Simon McVittie
510f221b9e g_hmac_get_string: don't allocate and leak an unused buffer
Also document why we're not actually using the buffer for anything.

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=666113
Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
2012-01-16 17:47:58 +00:00
Simon McVittie
bc2e3d0379 g_hmac_copy: initialize the refcount
In practice, the uninitialized refcount will typically mean that the copy is
never freed, and leaks.

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=666113
Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
2012-01-16 17:47:52 +00:00
Alexandre Franke
656bbe33ae Fix wording
délai épuisé has been replaced with délai dépassé
2011-12-12 20:40:31 +01:00
Aleksander Morgado
1070726700 gdbus-codegen: fix typo in generated documentation
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=665858
2011-12-09 15:20:56 +01:00
Simon McVittie
44a1663aa9 GDBusConnection: propagate error correctly if flags are inappropriate
Previously, this would fail the assertion
"connection->initialization_error != NULL" after the label "out".

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=665067
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: David Zeuthen <davidz@redhat.com>
2011-12-05 18:15:01 +00:00
Simon McVittie
a8ee10cc7d GDBusWorker: continue_writing: initialize flush_async_data if closing
This was a regression in commits f41178c6c and d0d04c09: flush_async_data
wasn't necessarily NULL in the "don't flush" case.

Also move initialization of these variables up so that it's
unconditional, since that's easier to verify than checking
that each branch gets it right.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=664617
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2011-11-23 12:02:21 +00:00
Simon McVittie
d09677881b Add test case for #662395
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=662395
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
2011-11-21 16:06:21 +00:00
Simon McVittie
07217e8721 GDBus tests: factor out TestIOStream, test_pipe and test_bidi_pipe
These might even make useful public API if they grew a Windows
implementation, but for now they can be Unix-only test API.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=662395
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
2011-11-21 16:06:18 +00:00
Simon McVittie
e5019d2d85 _g_dbus_worker_flush_sync: always flush if we need to
We didn't previously flush in a couple of cases where we should have
done:

* a write is running when flush is called: we should flush after it
  finishes

* writes have been made since the last flush, but none are pending or
  running right now: we should flush the underlying transport straight
  away

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=662395
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
2011-11-21 16:06:15 +00:00
Simon McVittie
d0d04c091a GDBusWorker: move flush async op into continue_writing()
This makes it easier to schedule a flush, by putting it on the same code
path as writing and closing.

Also change message_written to expect the lock to be held, since all
that's left in that function either wants to hold the lock or doesn't
care, and it's silly to release the lock immediately before calling
message_written, which just takes it again.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=662395
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
2011-11-21 16:06:12 +00:00
Simon McVittie
210c0c0cd5 schedule_write_in_worker_thread: require caller to lock; rename accordingly
When we use this function to schedule a flush, it'll be called
with the lock held. Releasing and immediately re-taking the lock would
be pointless.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=662395
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
2011-11-21 16:06:09 +00:00
Simon McVittie
628eee1c7d GDBusWorker: rename some functions
maybe_write_next_message now also closes, and I'm about to make it
consider whether to flush as well, so its name is increasingly
inappropriate. Similarly, write_message_in_idle_cb is a wrapper around
it which could do any of those things.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=662395
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
2011-11-21 16:06:05 +00:00
Simon McVittie
8efe505905 GDBusWorker: distinguish between 3 sorts of output that might be pending
If the user calls flush_sync() with no messages in the queue, but an
async write call pending, then we ought to flush after that async write
returns (although we don't currently do that). If it was an async close
or flush that was pending, there's no need to flush (again) afterwards.
So, we need to distinguish.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=662395
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
2011-11-21 16:05:39 +00:00
Sjoerd Simons
439f3b8e54 Fix 1bit mutex test on platforms with 32 bit aligned pointers
The 1 bit mutex tests asserts: ((gsize) ptrs) % 8, ==, 0), which fails
when the platform only aligns porters to 32 bits (e.g. S390 and
powerpc).

I'm not sure why this assertion was placed here, but given
that internally g_pointer_bit_trylock uses g_atomic_int_or internally
change the assertion so it only requires the alignment to be a multiple
of sizeof(int)
2011-11-15 09:28:53 +01:00
Matthias Clasen
c0541e0f4a Bump version 2011-11-11 17:51:30 -05:00
Matthias Clasen
179d8ac43f Updates 2.30.2 2011-11-11 17:11:31 -05:00