From: Andrea Zagli Date: Sat, 8 Aug 2015 07:33:28 +0000 (+0200) Subject: ZakCgiMain::get_parameters didn't return if already called (closes #960). X-Git-Tag: v0.0.1^0 X-Git-Url: https://saetta.ns0.it/gitweb?a=commitdiff_plain;h=a3672a535857ca711b14695d6603d36f677d943b;p=libzakcgi ZakCgiMain::get_parameters didn't return if already called (closes #960). --- 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"