Permalink
Commits on Aug 6, 2010
  1. notifyqueue: Dedup pspecs when adding

    Benjamin Otte
    Benjamin Otte committed Aug 6, 2010
    The previous code dedup'd when thawing and threw nasty warnings your way
    if you notified too often. This can now easily be avoided.
    
    Performance should be roughly identical, as both are O(n²).
  2. gitignore update

    desrt committed Aug 6, 2010
  3. gtester: Run tests only once on 'make check'

    desrt committed Aug 6, 2010
    The gtester makefile runs 'make test' on 'make check' and also recurses
    on 'make test'.  automake recurses on 'make check'.
    
    This means that every level of recursive make that we go through results
    in the tests running twice as many times.  If you type 'make check' at
    the toplevel, for example, tests in gio/tests/ run 4 times.
    
    Fix that by introducing a 'test-nonrecursive' target and using that one
    from 'make check'.  'make test', 'make test-report', etc. are still
    recursive.
  4. Fix volumemonitor test case

    desrt committed Aug 6, 2010
    Don't blindly g_object_unref() that which may be NULL.
  5. typo fix: Dist the data for the test cases

    desrt committed Aug 6, 2010
    change 'dist_hook:' to 'dist-hook:'
  6. Replace -I with $(glib_INCLUDES) and friends

    desrt committed Aug 6, 2010
    Stop using ad hoc -I in all of our Makefile.am.  Use the new variables
    instead.
  7. configure.ac: define glib_INCLUDES and friends

    desrt committed Aug 6, 2010
    These macros should be used instead of -I for things in the tree that
    depend on various bits of glib.
    
    also gobject_INCLUDES, gthread_INCLUDES, gmodule_INCLUDES, gio_INCLUDES
  8. Clean up improper #includes

    desrt committed Aug 6, 2010
    We have a lot of broken #including going on around the tree.  This has
    gone unnoticed due to our sloppy use of -I.
  9. Don't dist 'glibconfig.h'

    desrt committed Aug 6, 2010
    This is causing very serious problems when doing out-of-tree builds from
    tarballs on architectures that are different from the architecture that
    the tarball was created on.
    
    This commit breaks the build in those cases, but I'll fix that in the
    next commits.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=626107
  10. error test case: don't double-free the source

    desrt committed Aug 6, 2010
    g_propagate_prefixed_error() frees the source already, don't
    g_error_free() it.
Commits on Aug 5, 2010
  1. Updated French translation

    claudep committed Aug 5, 2010
    Contributed by Gérard Baylard and Claude Paroz
  2. Add $(top_builddir)/glib to includes

    paul authored and desrt committed Aug 5, 2010
    This is required to find glibconfig.h during srcdir != builddir builds
  3. Updated Spanish translation

    Jorge González
    Jorge González committed Aug 5, 2010
  4. Expand documentation about error quark naming

    Philip Withnall authored and pwithnall committed Aug 2, 2010
    Closes: bgo#625827
  5. Test an option handling corner-case

    Matthias Clasen
    Matthias Clasen committed Aug 5, 2010
  6. Add a not about arguments beginning with dashes

    Matthias Clasen
    Matthias Clasen committed Aug 5, 2010
  7. Updated Hebrew translation.

    yarons committed Aug 5, 2010
  8. Beautify configure output

    Matthias Clasen
    Matthias Clasen committed Aug 5, 2010
    Checking for cpp before using it avoids somewhat ugly
    nested output. Pointed out in bug 593544.
  9. Modernize pkg-config check

    Matthias Clasen
    Matthias Clasen committed Aug 5, 2010
    As pointed out in bug 599590, our hand-rolled check fails to find
    cross-complication variants of pkg-config like i686-pc-mingw32-pkg-config.
  10. Add missing files

    Matthias Clasen
    Matthias Clasen committed Aug 5, 2010
    Reported in bug 624739
Commits on Aug 4, 2010
  1. GDBus: Add `return' debug option

    David Zeuthen
    David Zeuthen committed Aug 4, 2010
    This prints all GDBusMethodInvocation API usage and is normally used
    with the `incoming' option. Example:
    
     # G_DBUS_DEBUG=incoming,return ./polkitd --replace
     Entering main event loop
     Connected to the system bus
     Registering null backend at priority -10
     [...]
     Acquired the name org.freedesktop.PolicyKit1
     [...]
    
     ========================================================================
     GDBus-debug:Incoming:
      <<<< METHOD INVOCATION org.freedesktop.PolicyKit1.Authority.RegisterAuthenticationAgent()
           on object /org/freedesktop/PolicyKit1/Authority
           invoked by name :1.26
           serial 299
     ========================================================================
     GDBus-debug:Return:
      >>>> METHOD ERROR org.freedesktop.PolicyKit1.Error.Failed
           message `Cannot determine session the caller is in'
           in response to org.freedesktop.PolicyKit1.Authority.RegisterAuthenticationAgent()
           on object /org/freedesktop/PolicyKit1/Authority
           to name :1.26
           reply-serial 299
    
     [...]
    
     ========================================================================
     GDBus-debug:Incoming:
      <<<< METHOD INVOCATION org.freedesktop.PolicyKit1.Authority.RegisterAuthenticationAgent()
           on object /org/freedesktop/PolicyKit1/Authority
           invoked by name :1.2402
           serial 25
     ========================================================================
     GDBus-debug:Return:
      >>>> METHOD RETURN
           in response to org.freedesktop.PolicyKit1.Authority.RegisterAuthenticationAgent()
           on object /org/freedesktop/PolicyKit1/Authority
           to name :1.2402
           reply-serial 25
    
    Signed-off-by: David Zeuthen <davidz@redhat.com>
  2. GDBusMessage: Validate header fields when serializing/deserializing

    David Zeuthen
    David Zeuthen committed Aug 4, 2010
    The D-Bus spec mentions exactly what header fields are required for
    various message types. Add tests for this as well.
    
    Also disallow empty interfaces for signals since the D-Bus spec says
    this is Verboten already.
    
    Signed-off-by: David Zeuthen <davidz@redhat.com>
  3. GDBusMessage: Add a way to get/set byte order of a message

    David Zeuthen
    David Zeuthen committed Aug 4, 2010
    Also use this in the test cases to check that serialization to and
    from both big and little endian works.
    
    Signed-off-by: David Zeuthen <davidz@redhat.com>
  4. GDBusMessage: Assert various things when serializing to a blob

    David Zeuthen
    David Zeuthen committed Aug 4, 2010
    We use g_assert() instead of setting the GError because it is a
    programming error if the GVariant contains invalid data - see commit
    5e6f762 for where the last hole in
    GVariant was closed.
    
    So if we can trust GVariant to only contain valid data (ignoring the
    case where unsafe API such as g_variant_new_from_data() is used), why
    g_assert() at all with costly g_utf8_validate() checks? Because a) it
    is relatively inexpensive; and b) it helps find bugs such as the one
    fixed in commit 5e6f762.
    
    If performance is a concern we can play games like introducing
    environment variables or other machinery to avoid such "costly"
    checks. I doubt it will ever be an issue.
    
    Also replace two "Hmm" TODO item with a static assert - the code that
    serializes a gdouble into the D-Bus wire format by treating it as a
    guint64 is indeed correct - endianess needs to be taken into account
    (see the D-Bus reference implementation for similar code). But we want
    to make sure that we're indeed using an architecture/compiler where a
    gdouble takes up 8 bytes - hence the assertion.
    
    Signed-off-by: David Zeuthen <davidz@redhat.com>
  5. GDBusMessage: Validate UTF-8 strings when serializing from blob

    David Zeuthen
    David Zeuthen committed Aug 4, 2010
    Signed-off-by: David Zeuthen <davidz@redhat.com>
  6. remove a junk line

    danwinship committed Aug 4, 2010
  7. Updated Norwegian bokmål translation

    Kjartan Maraas
    Kjartan Maraas committed Aug 4, 2010
  8. binding: Add a default marshaller for the closure API

    Emmanuele Bassi
    Emmanuele Bassi committed Aug 3, 2010
    The g_object_bind_property_with_closures() function should set a
    marshaller if the two GClosures don't have one already. This simplifies
    the caller code and avoids duplication.
    
    We need to add a new marshaller to the gmarshal.list matching the
    signature of the GBindingTransformFunc function.
Commits on Aug 3, 2010
  1. GDBusConnection: Debug messages when receiving signals and method inv…

    David Zeuthen
    David Zeuthen committed Aug 3, 2010
    …ocations
    
    Spell out "RECEIVED SIGNAL" instead of "SIGNAL" to emphasize this is
    about receiving a signal, not emitting one (which is "SIGNAL
    EMISSION"). Also make the "arrows" point in the "right" direction
    ("<<<<" vs ">>>>") - like this:
    
     ========================================================================
     GDBus-debug:Signal:
      <<<< RECEIVED SIGNAL org.freedesktop.DBus.NameOwnerChanged
           on object /org/freedesktop/DBus
           sent by name org.freedesktop.DBus
    
    and
    
     ========================================================================
     GDBus-debug:Incoming:
      <<<< METHOD INVOCATION org.freedesktop.PolicyKit1.Authority.EnumerateTemporaryAuthorizations()
           on object /org/freedesktop/PolicyKit1/Authority
           invoked by name :1.2176
    
    Signed-off-by: David Zeuthen <davidz@redhat.com>
  2. glib-compile-schemas: Pass a C string, not a GString wrapper

    David Zeuthen
    David Zeuthen committed Aug 3, 2010
    Commit 5e6f762 (introducing UTF-8
    validity checks for GVariant instances containing strsings) actually
    uncovered a bug in glib-compile-schemas - a GString was passed when a
    C string was expected.
    
    Signed-off-by: David Zeuthen <davidz@redhat.com>
  3. GVariant: validate that passed string is UTF-8

    David Zeuthen
    David Zeuthen committed Aug 3, 2010
    As discussed with Ryan on IRC.
    
    This check is crucial because it guarantees that
    g_variant_get_string() will _always_ return valid UTF-8. Except in
    cases where the programmer used unsafe API such as
    g_variant_new_from_data() and setting @trusted to TRUE.
    
    In fact, this check revealed a flaw in my polkit gdbus port
    
     (lt-polkitd:11632): GLib-CRITICAL **: g_variant_new_string: assertion
     `g_utf8_validate (string, len, NULL)' failed
    
    and with this I could easily find the problem by using gdb(1) and
    G_DBUS=fatal-warnings.
    
    Without this check we'd pass the non-UTF8 string all the way to the
    message bus and the bus would then disconnect us. So instead I was
    seeing
    
      g_dbus_connection_real_closed: Remote peer vanished with error:
      Underlying GIOStream returned 0 bytes on an async read
      (g-io-error-quark, 0). Exiting.
    
    and then SIGTERM as raised by g_dbus_connection_real_closed() and my
    polkitd process would exit. This behavior is much harder to debug than
    failing early (as this patch implements).
    
    Signed-off-by: David Zeuthen <davidz@redhat.com>