summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoss Burton <ross@linux.intel.com>2010-08-05 19:19:15 +0100
committerRoss Burton <ross@linux.intel.com>2010-08-06 18:09:10 +0100
commit527d74ace619ce86afff3cca6b849aeb2f785dd7 (patch)
tree843cf2fcd7391192b02e72e154b01ef498f200a3
parent01dc568ed85c3e7eba9dbf570020f57e962099c2 (diff)
Skip non-string params in rest_params_as_string_hash_table
-rw-r--r--rest/rest-params.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/rest/rest-params.c b/rest/rest-params.c
index 794a608..38c1554 100644
--- a/rest/rest-params.c
+++ b/rest/rest-params.c
@@ -181,14 +181,14 @@ rest_params_as_string_hash_table (RestParams *params)
RestParam *param = NULL;
g_return_val_if_fail (params, NULL);
- g_return_val_if_fail (rest_params_are_strings (params), NULL);
hash = (GHashTable *)params;
strings = g_hash_table_new (g_str_hash, g_str_equal);
g_hash_table_iter_init (&iter, hash);
while (g_hash_table_iter_next (&iter, (gpointer)&name, (gpointer)&param)) {
- g_hash_table_insert (strings, (gpointer)name, (gpointer)rest_param_get_content (param));
+ if (rest_param_is_string (param))
+ g_hash_table_insert (strings, (gpointer)name, (gpointer)rest_param_get_content (param));
}
return strings;