Yaron Shahrabani [Thu, 5 Aug 2010 06:14:40 +0000 (09:14 +0300)]
Updated Hebrew translation.
Matthias Clasen [Thu, 5 Aug 2010 05:53:15 +0000 (01:53 -0400)]
Beautify configure output
Checking for cpp before using it avoids somewhat ugly
nested output. Pointed out in bug 593544.
Matthias Clasen [Thu, 5 Aug 2010 05:45:26 +0000 (01:45 -0400)]
Modernize pkg-config check
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.
Matthias Clasen [Thu, 5 Aug 2010 05:39:02 +0000 (01:39 -0400)]
Add missing files
Reported in bug 624739
David Zeuthen [Wed, 4 Aug 2010 20:59:26 +0000 (16:59 -0400)]
GDBus: Add `return' debug option
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>
David Zeuthen [Wed, 4 Aug 2010 18:38:51 +0000 (14:38 -0400)]
GDBusMessage: Validate header fields when serializing/deserializing
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>
David Zeuthen [Wed, 4 Aug 2010 17:32:19 +0000 (13:32 -0400)]
GDBusMessage: Add a way to get/set byte order of a message
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>
David Zeuthen [Wed, 4 Aug 2010 16:24:22 +0000 (12:24 -0400)]
GDBusMessage: Assert various things when serializing to a blob
We use g_assert() instead of setting the GError because it is a
programming error if the GVariant contains invalid data - see commit
5e6f762d61db1a5c64bd1d33e5ba112755106581 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
5e6f762d61db1a5c64bd1d33e5ba112755106581.
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>
David Zeuthen [Wed, 4 Aug 2010 15:26:48 +0000 (11:26 -0400)]
GDBusMessage: Validate UTF-8 strings when serializing from blob
Signed-off-by: David Zeuthen <davidz@redhat.com>
Dan Winship [Wed, 4 Aug 2010 11:36:04 +0000 (07:36 -0400)]
remove a junk line
Kjartan Maraas [Wed, 4 Aug 2010 11:23:02 +0000 (13:23 +0200)]
Updated Norwegian bokmål translation
Emmanuele Bassi [Tue, 3 Aug 2010 23:57:52 +0000 (00:57 +0100)]
binding: Add a default marshaller for the closure API
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.
David Zeuthen [Tue, 3 Aug 2010 19:36:16 +0000 (15:36 -0400)]
GDBusConnection: Debug messages when receiving signals and method invocations
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>
David Zeuthen [Tue, 3 Aug 2010 18:32:29 +0000 (14:32 -0400)]
glib-compile-schemas: Pass a C string, not a GString wrapper
Commit
5e6f762d61db1a5c64bd1d33e5ba112755106581 (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>
David Zeuthen [Tue, 3 Aug 2010 17:33:03 +0000 (13:33 -0400)]
GVariant: validate that passed string is UTF-8
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>
David Zeuthen [Tue, 3 Aug 2010 16:47:07 +0000 (12:47 -0400)]
Fix gdbus-exit-on-close test case
Forgot to update the test case after last commit.
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Tue, 3 Aug 2010 16:24:48 +0000 (12:24 -0400)]
GDBus: If exiting b/c remote peer disconnected and error is set, print it
This should make things easier to debug:
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.
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Tue, 3 Aug 2010 15:14:21 +0000 (11:14 -0400)]
GDBusProxy: Don't leak a GSimpleAsyncResult when doing async calls
Signed-off-by: David Zeuthen <davidz@redhat.com>
Matthias Clasen [Tue, 3 Aug 2010 14:41:21 +0000 (10:41 -0400)]
Fix a possible deadlock
the FdSource was calling g_cancellable_disconnect while holding the
main context lock, which is bad news if the ::cancelled handler is
trying to get that lock to wake up the mainloop...
Bug 586432
Matthias Clasen [Sun, 1 Aug 2010 06:36:27 +0000 (02:36 -0400)]
fix the completion test
Matthias Clasen [Sun, 1 Aug 2010 06:11:15 +0000 (02:11 -0400)]
improve completion test coverage
Matthias Clasen [Sun, 1 Aug 2010 06:07:50 +0000 (02:07 -0400)]
Don't assert too much
Matthias Clasen [Sun, 1 Aug 2010 06:07:21 +0000 (02:07 -0400)]
Move bookmarkfile tests to the test framework
Emmanuele Bassi [Tue, 3 Aug 2010 13:21:02 +0000 (14:21 +0100)]
Update the Git ignore files
Mark Wielaard [Mon, 2 Aug 2010 21:28:50 +0000 (23:28 +0200)]
Don't add (extra) DESTDIR to tapsetdir for tapset_DATA.
https://bugzilla.gnome.org/show_bug.cgi?id=625876
Emmanuele Bassi [Tue, 3 Aug 2010 09:34:59 +0000 (10:34 +0100)]
docs: Clarify user_data behavior for bind_property_full()
Emmanuele Bassi [Tue, 3 Aug 2010 09:29:50 +0000 (10:29 +0100)]
binding: Add G_BINDING_INVERT_BOOLEAN
Since GSettings got the same functionality and flag in commit
ca3b7b75b
GBinding should also have the ability to automatically invert a boolean
value without requiring a custom transformation function.
Emmanuele Bassi [Tue, 13 Jul 2010 05:03:03 +0000 (06:03 +0100)]
binding: Add a closure-based variant of bind_property_full()
Since using the function pointer version muddles the memory management
requirements of language bindings, we should implement a GClosure-based
variant on top of g_object_bind_property_full().
https://bugzilla.gnome.org/show_bug.cgi?id=622278
Ryan Lortie [Tue, 3 Aug 2010 06:08:03 +0000 (02:08 -0400)]
GSettings: add G_SETTINGS_BIND_INVERT_BOOLEAN flag
When binding a boolean setting to a boolean property, invert the values.
This avoids the requirement for writing a pair of mapping functions for
this extremely common case.
Add a test.
https://bugzilla.gnome.org/show_bug.cgi?id=625833
Fridrich Štrba [Mon, 2 Aug 2010 08:16:29 +0000 (10:16 +0200)]
On windows, export also symbols defined in gio/gwin32appinfo.c
Fran Diéguez [Sun, 1 Aug 2010 21:18:31 +0000 (23:18 +0200)]
Updated Galician translations
Carlos Garcia Campos [Sun, 1 Aug 2010 10:56:06 +0000 (12:56 +0200)]
GDBusConnection: fix message flags in g_dbus_connection_call_sync()
GDBusCallFlags were used instead of GDBusSendMessageFlags for
g_dbus_connection_send_message_with_reply_sync(). Fixes bug #625753.
Stef Walter [Sun, 1 Aug 2010 05:14:43 +0000 (07:14 +0200)]
Add comment to g_date_set_time_val about local timezone.
Local time zone is used in conversion during g_date_set_time_val().
We now mention this in the documentation.
Fixes bug #625500
Milan Crha [Sun, 1 Aug 2010 03:51:45 +0000 (23:51 -0400)]
Silence valgrind
Initialize all fields of struct msghdr. Bug 625472.
Jorge González [Sat, 31 Jul 2010 13:11:48 +0000 (15:11 +0200)]
Updated Spanish translation
Yaron Shahrabani [Sat, 31 Jul 2010 07:05:05 +0000 (10:05 +0300)]
Updated Hebrew translation.
Matthias Clasen [Sat, 31 Jul 2010 06:40:16 +0000 (02:40 -0400)]
Also use trylock in the bitlock tests
Matthias Clasen [Sat, 31 Jul 2010 06:39:53 +0000 (02:39 -0400)]
improve scanner api test coverage
Matthias Clasen [Sat, 31 Jul 2010 06:15:03 +0000 (02:15 -0400)]
Improve tree test coverage
Matthias Clasen [Sat, 31 Jul 2010 06:14:51 +0000 (02:14 -0400)]
Improve keyfile test coverage
Matthias Clasen [Sat, 31 Jul 2010 06:14:28 +0000 (02:14 -0400)]
Test some GError functionality explicitly
Matthias Clasen [Sat, 31 Jul 2010 06:14:01 +0000 (02:14 -0400)]
Add a test for g_variant_builder_add_parsed
Matthias Clasen [Sat, 31 Jul 2010 06:07:38 +0000 (02:07 -0400)]
Fix a typo
Matthias Clasen [Sat, 31 Jul 2010 04:56:11 +0000 (00:56 -0400)]
Improve string test coverage
Matthias Clasen [Sat, 31 Jul 2010 04:55:57 +0000 (00:55 -0400)]
Improve byte array test coverage
Matthias Clasen [Sat, 31 Jul 2010 04:13:02 +0000 (00:13 -0400)]
Improve gdbus test coverage
Matthias Clasen [Sat, 31 Jul 2010 03:44:30 +0000 (23:44 -0400)]
Fix a typo
Its credentials, not crendentials
Matthias Clasen [Fri, 30 Jul 2010 20:44:25 +0000 (16:44 -0400)]
Fix an off-by-one error
Matthias Clasen [Fri, 30 Jul 2010 20:21:49 +0000 (16:21 -0400)]
Add a test for g_dbus_proxy_get_cached_property_names
Matthias Clasen [Fri, 30 Jul 2010 19:36:15 +0000 (15:36 -0400)]
improve printf tests coverage
Matthias Clasen [Fri, 30 Jul 2010 19:35:47 +0000 (15:35 -0400)]
Improve option context test coverage
Matthias Clasen [Fri, 30 Jul 2010 03:08:07 +0000 (23:08 -0400)]
Improve array test coverage
Matthias Clasen [Fri, 30 Jul 2010 00:52:31 +0000 (20:52 -0400)]
Move markup parse tests to the test framework
Matthias Clasen [Thu, 29 Jul 2010 06:20:43 +0000 (02:20 -0400)]
Improve coverage of buffered output stream tests
Matthias Clasen [Thu, 29 Jul 2010 06:20:29 +0000 (02:20 -0400)]
Improve coverage of credentials tests
Matthias Clasen [Thu, 29 Jul 2010 06:20:15 +0000 (02:20 -0400)]
Improve coverage of converter stream tests
Matthias Clasen [Thu, 29 Jul 2010 06:19:46 +0000 (02:19 -0400)]
Improve coverage of memory stream tests
Matthias Clasen [Thu, 29 Jul 2010 06:19:27 +0000 (02:19 -0400)]
Remove redundant include
Matthias Clasen [Thu, 29 Jul 2010 06:19:01 +0000 (02:19 -0400)]
Improve coverage of icon tests
Matthias Clasen [Thu, 29 Jul 2010 06:18:45 +0000 (02:18 -0400)]
Improve coverage of application tests
Matthias Clasen [Thu, 29 Jul 2010 04:54:23 +0000 (00:54 -0400)]
Improve coverage of stream tests
Matthias Clasen [Thu, 29 Jul 2010 04:53:30 +0000 (00:53 -0400)]
Reenable unix-streams test
Matthias Clasen [Thu, 29 Jul 2010 04:52:34 +0000 (00:52 -0400)]
Work around deadlock in unix-streams test
Matthias Clasen [Wed, 28 Jul 2010 20:59:11 +0000 (16:59 -0400)]
Add tests about file associations
Matthias Clasen [Wed, 28 Jul 2010 20:05:19 +0000 (16:05 -0400)]
Improve regex test coverage
Matthias Clasen [Tue, 27 Jul 2010 22:21:15 +0000 (18:21 -0400)]
Remove duplicate utf8 strreverse test
Also add some tests for find next/prev char.
Matthias Clasen [Tue, 27 Jul 2010 20:52:36 +0000 (16:52 -0400)]
Improve strfuncs test coverage a bit
Matthias Clasen [Tue, 27 Jul 2010 20:25:13 +0000 (16:25 -0400)]
Improve option context test coverage a bit
Matthias Clasen [Tue, 27 Jul 2010 20:24:56 +0000 (16:24 -0400)]
Move markup collect tests to the test framework
Matthias Clasen [Tue, 27 Jul 2010 20:24:08 +0000 (16:24 -0400)]
Add some more GFile tests
Matthias Clasen [Tue, 27 Jul 2010 18:01:48 +0000 (14:01 -0400)]
Improve compressor test coverage a bit
Matthias Clasen [Tue, 27 Jul 2010 05:00:55 +0000 (01:00 -0400)]
Test g_settings_list_schemas
Matthias Clasen [Tue, 27 Jul 2010 04:17:20 +0000 (00:17 -0400)]
Improve GNode test coverage a bit
Matthias Clasen [Tue, 27 Jul 2010 03:24:31 +0000 (23:24 -0400)]
Add some logging tests
Matthias Clasen [Tue, 27 Jul 2010 03:06:33 +0000 (23:06 -0400)]
Silence log handler tests
Matthias Clasen [Tue, 27 Jul 2010 02:13:25 +0000 (22:13 -0400)]
Improve tree test coverage
Matthias Clasen [Tue, 27 Jul 2010 02:12:59 +0000 (22:12 -0400)]
Move markup escape tests to test framework
Matthias Clasen [Tue, 27 Jul 2010 01:19:04 +0000 (21:19 -0400)]
More pattern tests
Matthias Clasen [Tue, 27 Jul 2010 01:18:22 +0000 (21:18 -0400)]
Add tests for g_utf8_strreverse
Matthias Clasen [Tue, 27 Jul 2010 01:17:56 +0000 (21:17 -0400)]
Fix a warning
Matthias Clasen [Tue, 27 Jul 2010 01:16:03 +0000 (21:16 -0400)]
Don't leak in converter test
Matthias Clasen [Tue, 27 Jul 2010 00:22:33 +0000 (20:22 -0400)]
Fix an icon test
Matthias Clasen [Mon, 26 Jul 2010 23:07:16 +0000 (19:07 -0400)]
Add tests for GNetworkAddress
Matthias Clasen [Mon, 26 Jul 2010 22:40:17 +0000 (18:40 -0400)]
Drop an unneeded if
Matthias Clasen [Mon, 26 Jul 2010 22:15:24 +0000 (18:15 -0400)]
Remove some unused pcre code
Matthias Clasen [Mon, 26 Jul 2010 21:59:18 +0000 (17:59 -0400)]
Add some volume monitor tests
Although not much of this is easily testable.
Matthias Clasen [Sun, 25 Jul 2010 23:12:51 +0000 (19:12 -0400)]
Move queue tests to the test framework
David Zeuthen [Fri, 30 Jul 2010 20:33:29 +0000 (16:33 -0400)]
Bug 625628 – GDBusProxy: wrong property name sorting
https://bugzilla.gnome.org/show_bug.cgi?id=625628
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Fri, 30 Jul 2010 20:30:34 +0000 (16:30 -0400)]
Fix gschema-compile test
This was broken by commit
1b5b87bfa0f5435dd6e973a4e36076db083dc5c7
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Fri, 30 Jul 2010 20:01:03 +0000 (16:01 -0400)]
Bug 625584 – Crashes application on unref with signal subscription
Don't do too much work in the finalizer - in particular, there's no
need to send RemoveMatch() messages to the bus daemon since we're
going to sever the connection and the bus will garbage collect
anyway. In this case it crashed the process.
Also add a test case that checks that the appropriate GDestroyNotify
callbacks are called when unreffing a connection with either 1)
exported objects; 2) signal subscriptions or 3) filter functions
.. yes, ideally apps would unregister such callbacks before giving up
their ref but that's not how things work :-)
Signed-off-by: David Zeuthen <davidz@redhat.com>
Ryan Lortie [Fri, 30 Jul 2010 19:10:53 +0000 (21:10 +0200)]
GSettings: Mark some strings for cat translation
<vuntz> *miaou*
David Zeuthen [Fri, 30 Jul 2010 15:40:00 +0000 (11:40 -0400)]
GDBusConnection: Fix up debug output when completing calls
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Fri, 30 Jul 2010 15:26:43 +0000 (11:26 -0400)]
GCredentials: use effective uid/gid
Otherwise e.g. setuid root processes can't connect to the system
bus. This was discovered when porting PolicyKit's pkexec(1) command to
a PolicyKit library using GDBus.
Signed-off-by: David Zeuthen <davidz@redhat.com>
Ryan Lortie [Thu, 29 Jul 2010 20:04:43 +0000 (22:04 +0200)]
*bump*
Ryan Lortie [Thu, 29 Jul 2010 14:52:34 +0000 (16:52 +0200)]
add one more NEWS item
Eduardo Lima Mitev [Mon, 26 Jul 2010 15:21:14 +0000 (17:21 +0200)]
GIO: Add G-I annotations for several methods
Specifically:
- g_io_stream_get_input/output_stream()
- g_socket_client_get_local_address()
- g_socket_connection_get_socket()
- g_socket_listener_add_address()
- g_socket_listener_accept_socket()
- g_socket_listener_accept()
- g_io_extension_point_get_extensions()
Ryan Lortie [Thu, 29 Jul 2010 10:01:46 +0000 (12:01 +0200)]
get a start on the NEWS
Owen Taylor [Wed, 28 Jul 2010 19:15:57 +0000 (15:15 -0400)]
[gschema-compile] fix segfault
If files are passed on the command line and we don't set override_files
at all, don't try to read from the array.
David Zeuthen [Wed, 28 Jul 2010 16:58:04 +0000 (12:58 -0400)]
Use correct type for GDBusServer:active property
It's a boolean, not a string.
Signed-off-by: David Zeuthen <davidz@redhat.com>
David Zeuthen [Wed, 28 Jul 2010 16:48:17 +0000 (12:48 -0400)]
GDBusConnection: Pass the GObject to g_simple_async_result_new()
Signed-off-by: David Zeuthen <davidz@redhat.com>