From a3672a535857ca711b14695d6603d36f677d943b Mon Sep 17 00:00:00 2001 From: Andrea Zagli Date: Sat, 8 Aug 2015 09:33:28 +0200 Subject: [PATCH] ZakCgiMain::get_parameters didn't return if already called (closes #960). --- src/main.c | 1 + tests/querystring.c | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index fdeb9ab..e3d7934 100644 --- a/src/main.c +++ b/src/main.c @@ -428,6 +428,7 @@ GHashTable if (priv->ht_parameters != NULL) { ht = g_hash_table_ref (priv->ht_parameters); + return ht; } } diff --git a/tests/querystring.c b/tests/querystring.c index e69873c..c5d680a 100644 --- a/tests/querystring.c +++ b/tests/querystring.c @@ -28,7 +28,14 @@ main (int argc, char *argv[]) gpointer key; gpointer value; - ht_env = zak_cgi_main_get_parameters (NULL, NULL); + ZakCgiMain *main; + + main = zak_cgi_main_new (); + + ht_env = zak_cgi_main_get_parameters (main, NULL); + + /* test #960 */ + ht_env = zak_cgi_main_get_parameters (main, NULL); str = g_string_new ("\n" "Query string\n" -- 2.49.0