[glib] GDBus: Allow tcp: and nonce-tcp: addresses without any arguments
- From: David Zeuthen <davidz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] GDBus: Allow tcp: and nonce-tcp: addresses without any arguments
- Date: Wed, 13 Apr 2011 21:51:03 +0000 (UTC)
commit 25c57d31c5f8bb36f17328bbeacce4796490b241
Author: David Zeuthen <davidz redhat com>
Date: Wed Apr 13 17:49:19 2011 -0400
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>
gio/gdbusaddress.c | 29 ++++++-----------------------
1 files changed, 6 insertions(+), 23 deletions(-)
---
diff --git a/gio/gdbusaddress.c b/gio/gdbusaddress.c
index 1f2645e..642aa2d 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]