From: Andrea Zagli Date: Wed, 18 May 2016 15:11:46 +0000 (+0200) Subject: ZakCgiSession: file create immediately in costructor (closes #1024). X-Git-Tag: v0.1.0~5 X-Git-Url: https://saetta.ns0.it/gitweb?a=commitdiff_plain;h=613a0f3a51c0cacb10b234fd0b6080a0c5550072;p=libzakcgi ZakCgiSession: file create immediately in costructor (closes #1024). --- diff --git a/src/session.c b/src/session.c index d992622..b5e3598 100644 --- a/src/session.c +++ b/src/session.c @@ -161,6 +161,8 @@ ZakCgiSession { zak_cgi_session_close (zak_cgi_session); } + + zak_cgi_session_create_file (zak_cgi_session); } return zak_cgi_session; @@ -213,7 +215,10 @@ gchar if (priv->sid == NULL) { zak_cgi_session_create_file (session); + } + if (priv->sid != NULL) + { ht_env = zak_cgi_main_get_env (priv->zakcgimain); ret = zak_cgi_main_set_cookie ("ZAKCGISID", priv->sid, NULL, NULL, @@ -512,7 +517,9 @@ zak_cgi_session_create_file (ZakCgiSession *session) if (iostream == NULL || error != NULL) { - /* TODO */ + g_warning ("Unable to create the session file «%s»: %s.", + filename, + error != NULL && error->message != NULL ? error->message : "no details"); } else {