]> saetta.ns0.it Git - libzakcgi/commitdiff
ZakCgiSession: use of GKeyFile::get_string to handle escaped characters.
authorAndrea Zagli <azagli@libero.it>
Wed, 4 May 2016 14:13:26 +0000 (16:13 +0200)
committerAndrea Zagli <azagli@libero.it>
Wed, 4 May 2016 14:13:26 +0000 (16:13 +0200)
src/session.c

index d2e940a253a8f6d941f68116120ee4e5957aad83..ee0d63a6b7cfe74187f53ca3c8d86d9c23b62a15 100644 (file)
@@ -140,14 +140,14 @@ ZakCgiSession
                                }
                        else
                                {
-                                       val = g_key_file_get_value (priv->kfile, "ZAKCGI", "REMOTE_ADDR", NULL);
+                                       val = g_key_file_get_string (priv->kfile, "ZAKCGI", "REMOTE_ADDR", NULL);
                                        if (val == NULL
                                                || g_strcmp0 (val, g_getenv ("REMOTE_ADDR")) != 0)
                                                {
                                                        zak_cgi_session_close (zak_cgi_session);
                                                }
 
-                                       val = g_key_file_get_value (priv->kfile, "ZAKCGI", "TIMESTAMP", NULL);
+                                       val = g_key_file_get_string (priv->kfile, "ZAKCGI", "TIMESTAMP", NULL);
                                        if (val == NULL)
                                                {
                                                        zak_cgi_session_close (zak_cgi_session);
@@ -325,7 +325,7 @@ gchar
        ret = NULL;
        if (priv->kfile != NULL)
                {
-                       ret = g_key_file_get_value (priv->kfile, "SESSION", name, NULL);
+                       ret = g_key_file_get_string (priv->kfile, "SESSION", name, NULL);
                }
 
        return ret;