]> saetta.ns0.it Git - libzakcgi/commitdiff
ZakCgiMain::get_parameters didn't return if already called (closes #960). v0.0.1
authorAndrea Zagli <azagli@libero.it>
Sat, 8 Aug 2015 07:33:28 +0000 (09:33 +0200)
committerAndrea Zagli <azagli@libero.it>
Sat, 8 Aug 2015 07:33:28 +0000 (09:33 +0200)
src/main.c
tests/querystring.c

index fdeb9abde82cbd8e64c7e44b1cc3bb17115d2378..e3d79345902d15abd924b33891bbff50eb7403ed 100644 (file)
@@ -428,6 +428,7 @@ GHashTable
                        if (priv->ht_parameters != NULL)
                                {
                                        ht = g_hash_table_ref (priv->ht_parameters);
+                                       return ht;
                                }
                }
 
index e69873c0ad2a8a864c5d9563aa209ec7f5c5cf1d..c5d680ae36ce99a138ce9267e0db610ab6990d1f 100644 (file)
@@ -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 ("<html>\n"
                            "<head><title>Query string</title></head>\n"