diff options
author | David Zeuthen <davidz@redhat.com> | 2011-04-13 17:49:19 -0400 |
---|---|---|
committer | David Zeuthen <davidz@redhat.com> | 2011-04-13 17:49:19 -0400 |
commit | 25c57d31c5f8bb36f17328bbeacce4796490b241 (patch) | |
tree | a62c07199b1daba670239ef916213770ab7863cb | |
parent | 68b16deb1f4ec739f80291156f2e0e2eed87d225 (diff) | |
download | glib-25c57d31c5f8bb36f17328bbeacce4796490b241.tar.gz |
GDBus: Allow tcp: and nonce-tcp: addresses without any arguments
This was broken in this commit
http://git.gnome.org/browse/glib/commit/?id=0729260141bb585943ad1c6efa8ab7ee9058b0aa
The test case for catching this is unfortunately commented out (so it
didn't catch it) due to this bug
https://bugzilla.gnome.org/show_bug.cgi?id=631379
still being unresolved.
Signed-off-by: David Zeuthen <davidz@redhat.com>
-rw-r--r-- | gio/gdbusaddress.c | 29 |
1 files changed, 6 insertions, 23 deletions
diff --git a/gio/gdbusaddress.c b/gio/gdbusaddress.c index 1f2645e1a..642aa2d9f 100644 --- a/gio/gdbusaddress.c +++ b/gio/gdbusaddress.c @@ -258,25 +258,13 @@ is_valid_nonce_tcp (const gchar *address_entry, goto out; } - if (nonce_file == NULL) + if (host != NULL) { - g_set_error (error, - G_IO_ERROR, - G_IO_ERROR_INVALID_ARGUMENT, - _("Error in address `%s' - missing noncefile attribute"), - address_entry); - goto out; - } - if (host == NULL) - { - g_set_error (error, - G_IO_ERROR, - G_IO_ERROR_INVALID_ARGUMENT, - _("Error in address `%s' - missing host attribute"), - address_entry); - goto out; + /* TODO: validate host */ } + nonce_file = nonce_file; /* To avoid -Wunused-but-set-variable */ + ret= TRUE; out: @@ -351,14 +339,9 @@ is_valid_tcp (const gchar *address_entry, goto out; } - if (host == NULL) + if (host != NULL) { - g_set_error (error, - G_IO_ERROR, - G_IO_ERROR_INVALID_ARGUMENT, - _("Error in address `%s' - missing host attribute"), - address_entry); - goto out; + /* TODO: validate host */ } ret= TRUE; |