Permalink
Commits on Nov 11, 2011
  1. Updates

    Matthias Clasen committed Nov 11, 2011
  2. docs: Improve g_variant_loop() docs

    Benjamin Otte committed with Matthias Clasen Oct 16, 2011
    Typo fix and changing "is not recommended" to the nice version of "don't
    do this", aka "causes undefined behavior".
  3. docs: Tell which function to use to avoid errors.

    Benjamin Otte committed with Matthias Clasen Jul 25, 2011
  4. Add a test for CDATA in gschema.xml files

    Matthias Clasen committed Nov 7, 2011
  5. Accept CDATA in gschema.xml files

    Matthias Clasen committed Nov 7, 2011
  6. glib-mkenums.in: fix @ENUMPREFIX@ with /*< underscore_name=... >*/

    danwinship committed with Matthias Clasen Oct 14, 2011
    For enums defined with an underscore_name override, @ENUMPREFIX@
    would include a trailing "_". Fix.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=661797
  7. g_bus_own_name: fix race when unowning a name immediately after ownin…

    David Zeuthen committed with Matthias Clasen Oct 27, 2011
    …g it
    
    ... and also add a test to verify that the fix works.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=662808
    
    Signed-off-by: David Zeuthen <davidz@redhat.com>
  8. Add TAGS files to .gitignore

    Damien Lespinau committed with Matthias Clasen Oct 25, 2011
    "make tags" is the best way to produce tags in an automake project and
    yet very few people are using it so the tags files it generates are never
    added to the .gitignore files.
    
    Add TAGS files to .gitignore then.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=615424
  9. Fix some build issues on OpenBSD

    rnagy committed with Matthias Clasen Oct 25, 2011
    Adapt to some OpenBSD header quirks.
    Patch by Robert Nagy.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=661386
  10. GVariant format string docs: fix maybe types

    desrt committed with Matthias Clasen Oct 21, 2011
    The documentation for maybe types failed to mention 'a' as one of the
    types that was handled with a single pointer for which NULL means
    "nothing".  Correct that omission.
    
    Problem caught by Shaun McCance.
  11. Pass correct data to fatal log handlers

    Matthias Clasen committed Oct 16, 2011
    This was pointed out by John Ralls in bug 653052.
    He also provided the test case.
  12. Clarify g_spawn_*() behaviour without full path

    martinpitt committed with Matthias Clasen Aug 17, 2011
    Document the previously uncovered case of calling g_spawn_async_with_pipes()
    without a full path but no G_SPAWN_SEARCH_PATH. This runs programs from the
    current directory, which might be unexpected and even dangerous in some corner
    cases.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=656621
  13. Document that types are limited to 64 KiB

    smcv committed with Matthias Clasen Oct 4, 2011
    Bug: https://bugzilla.gnome.org/show_bug.cgi?id=659916
    Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
  14. GDBusWorker: tolerate read errors while closing

    smcv committed Nov 11, 2011
    My previous fix for GNOME#662100 was incomplete: it seems that with some
    timings, the stream can be closed with an async read in-flight. This
    can make the read fail immediately with G_IO_ERROR_CLOSED instead of
    becoming cancelled.
    
    This happens reliably on an embedded device, and rarely on my laptop;
    repeating the test 100 times in quick succession reliably reproduces
    the bug on my laptop.
    
    It seems as though what we really want is to ignore read errors, once
    we've established that we want to close the connection anyway - this
    means that after asking to close, you're immune to exit-on-close,
    which seems like a good rule.
    
    An additional subtlety is that continuing to read after we know we
    want to close is still required, otherwise we'll never emit ::closed.
    
    Bug: https://bugzilla.gnome.org/show_bug.cgi?id=662100
    Bug-NB: NB#287088
    Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
    Reviewed-by: Colin Walters <walters@verbum.org>
  15. GDBusWorker: debug on read errors if transport debugging is enabled

    smcv committed Nov 10, 2011
    Bug: https://bugzilla.gnome.org/show_bug.cgi?id=662100
    Bug-NB: NB#287088
    Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
    Reviewed-by: Colin Walters <walters@verbum.org>
  16. gdbus-exit-on-close test: don't leak a variant

    smcv committed Nov 3, 2011
    Bug: https://bugzilla.gnome.org/show_bug.cgi?id=662100
    Bug-NB: NB#287088
    Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
    Reviewed-by: Colin Walters <walters@verbum.org>
  17. gdbus-exit-on-close test: optionally be more verbose for debugging

    smcv committed Nov 3, 2011
    Bug: https://bugzilla.gnome.org/show_bug.cgi?id=662100
    Bug-NB: NB#287088
    Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
    Reviewed-by: Colin Walters <walters@verbum.org>
Commits on Oct 27, 2011
  1. gdbus: avoid warning when finalizing a GDBusObjectManagerClient

    Aleksander Morgado committed Oct 27, 2011
    If the GDBusObjectManagerClient doesn't get a name owner during its lifetime,
    `on_control_proxy_g_signal' will never be connected to any signal, so we
    shouldn't dump any warning in that case.
    
    Fixes https://bugzilla.gnome.org/show_bug.cgi?id=662858
Commits on Oct 24, 2011
  1. Fix g_hash_table_iter_replace

    Matthias Clasen committed Oct 24, 2011
    When reusing an existing key 'internally', we must avoid calling
    the key_destroy function on the old key.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=662544
Commits on Oct 21, 2011
  1. GDBusMessage: fix leak of GError

    desrt committed Oct 21, 2011
    As part of the deserialisation process of a zero-length array in the
    DBus wire format, parse_value_from_blob() recursively calls itself with
    the expectation of failing (as can be seen by the assert immediately
    following).
    
    It passes &local_error to this always-failing call and then fails to
    free it (indeed, to use it at all).  The result is that the GError is
    leaked.
    
    Fix it by passing in NULL instead, so that the GError is never created
    in the first place.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=662411
  2. GDBusConnection: document use while uninitialized as undefined behaviour

    smcv committed Oct 20, 2011
    Bug: https://bugzilla.gnome.org/show_bug.cgi?id=661689
    Bug: https://bugzilla.gnome.org/show_bug.cgi?id=662208
    Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
    Reviewed-by: David Zeuthen <davidz@redhat.com>
  3. GDBusConnection: check for initialization where needed for thread-safety

    smcv committed Oct 20, 2011
    Also document which fields require such a check in order to have correct
    threading semantics.
    
    This usage doesn't matches the GInitable documentation, which suggests
    use of a GError - but using an uninitialized GDBusConnection is
    programming error, and not usefully recoverable. (The GInitable
    documentation may have been a mistake - GNOME#662208.) Also, not all of
    the places where we need it can raise a GError.
    
    The check serves a dual purpose: it turns a non-deterministic crash into
    a deterministic critical warning, and is also a memory barrier for
    thread-safety. All of these functions dereference or return fields that
    are meant to be protected by FLAG_INITIALIZED, so they could crash or
    return an undefined value to their caller without this, if called from a
    thread that isn't the one that called initable_init() (although I can't
    think of any way to do that without encountering a memory barrier,
    undefined behaviour, or a race condition that leads to undefined
    behaviour if the non-initializing thread wins the race).
    
    One exception is that initable_init() itself makes a synchronous call.
    We deal with that by passing new internal flags up the call stack, to
    reassure g_dbus_connection_send_message_unlocked() that it can go ahead.
    
    Bug: https://bugzilla.gnome.org/show_bug.cgi?id=661689
    Bug: https://bugzilla.gnome.org/show_bug.cgi?id=661992
    Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
    Reviewed-by: David Zeuthen <davidz@redhat.com>
  4. GDBusConnection: replace is_initialized with an atomic flag

    smcv committed Oct 18, 2011
    The comment implied that even failed initialization would set
    is_initialized = TRUE, but this wasn't the case - failed initialization
    would only set initialization_error, and it was necessary to check both.
    
    It turns out the documented semantics are nicer than the implemented
    semantics, since this lets us use atomic operations, which are also
    memory barriers, to avoid needing separate memory barriers or locks
    for initialization_error (and other members that are read-only after
    construction).
    
    I expect to need more than one atomically-accessed flag to fix thread
    safety, so instead of a minimal implementation I've turned is_initialized
    into a flags word.
    
    Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
    Bug: https://bugzilla.gnome.org/show_bug.cgi?id=661689
    Bug: https://bugzilla.gnome.org/show_bug.cgi?id=661992
    Reviewed-by: David Zeuthen <davidz@redhat.com>
Commits on Oct 19, 2011
  1. Revert "Simplify checks for CLOCK_MONOTONIC"

    Matthias Clasen committed Oct 19, 2011
    This reverts commit 7f66b04.
  2. gdbus-non-socket test: avoid use of a GMainContext across a fork

    smcv committed Oct 18, 2011
    See https://bugzilla.gnome.org/show_bug.cgi?id=658999 for why this would
    be bad.
    
    Bug: https://bugzilla.gnome.org/show_bug.cgi?id=662100
    Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
    Reviewed-by: David Zeuthen <davidz@redhat.com>
    (cherry picked from commit 612d238)
  3. gdbus-exit-on-close test: cover more possibilities

    smcv committed Oct 18, 2011
    We didn't previously test anything except the implicit default of TRUE.
    Now we test implicit TRUE, explicit TRUE, explicit FALSE, and
    disconnecting at the local end (which regressed while fixing Bug #651268).
    
    Also avoid some questionable use of a main context, which fell foul of
    Bug #658999 and caused this test to be disabled in master.
    
    Bug: https://bugzilla.gnome.org/show_bug.cgi?id=662100
    Bug-NB: NB#287088
    Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
    Reviewed-by: David Zeuthen <davidz@redhat.com>
    (cherry picked from commit be89f05)
  4. GDBusWorker: if a read was cancelled it means we closed the connection

    smcv committed Oct 19, 2011
    This was a regression caused by my previous work on GDBusWorker thread-safety
    (Bug #651268). The symptom is that if you disconnect a GDBusConnection
    locally, the default implementation of GDBusConnection::closed
    terminates your process, even though it shouldn't do that for
    locally-closed connections; this is because GDBusWorker didn't think a
    cancelled read was a local close.
    
    Bug: https://bugzilla.gnome.org/show_bug.cgi?id=662100
    Bug-NB: NB#287088
    Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
    Reviewed-by: David Zeuthen <davidz@redhat.com>
    (cherry picked from commit 5e0492d)
Commits on Oct 18, 2011
  1. GDBusConnection: Fix race in /gdbus/connection/life-cycle

    sjoerdsimons committed with smcv Oct 16, 2011
    GDBusConnection sets the closed flag in the worker thread, then adds an
    idle callback (which refs the Connection) to signal this in the main
    thread. The tests session_bus_down doesn't spin the mainloop, so the
    "closed" signal will always fire if iterating the mainloop later (and
    drops the ref when doing so). But _is_closed can return TRUE even before
    signalling this, in which case the "closed" signal isn't fired and the
    ref isn't dropped, causing the test to fail.
    
    Instead simply always wait for the closed signal, which is a good thing
    to check anyway and ensures the ref is closed.
    
    Bug: https://bugzilla.gnome.org/show_bug.cgi?id=661896
    Reviewed-by: Matthias Clasen <mclasen@redhat.com>
Commits on Oct 17, 2011
  1. GDBusConnection: warn that direct access to the stream is a bad idea

    smcv committed Oct 13, 2011
    Bug: https://bugzilla.gnome.org/show_bug.cgi?id=661679
    Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
    Reviewed-by: David Zeuthen <davidz@redhat.com>
  2. Updated Japanese translation

    OKANO Takayoshi committed with Jiro Matsuzawa Oct 17, 2011
Commits on Oct 16, 2011
  1. Updated Japanese translation

    Jiro Matsuzawa committed Oct 16, 2011
Commits on Oct 14, 2011
  1. Post-release version bump

    Matthias Clasen committed Oct 14, 2011