From: Daniel Carl <danielcarl@gmx.de>
Date: Mon, 21 Oct 2013 17:32:50 +0000 (+0200)
Subject: Set new cookie expire time if timeout is not 0.
X-Git-Url: https://git.owens.tech/about.html/about.html/git?a=commitdiff_plain;h=abfedec9c9ff8278018cdf92172de7d2c15c0bdc;p=vimb.git

Set new cookie expire time if timeout is not 0.
---

diff --git a/src/session.c b/src/session.c
index daa804a..e63e75b 100644
--- a/src/session.c
+++ b/src/session.c
@@ -82,7 +82,7 @@ static SoupCookieJar *cookiejar_new(const char *file, gboolean ro)
 static void cookiejar_changed(SoupCookieJar *self, SoupCookie *old_cookie, SoupCookie *new_cookie)
 {
     flock(COOKIEJAR(self)->lock, LOCK_EX);
-    if (new_cookie && !new_cookie->expires) {
+    if (new_cookie && !new_cookie->expires && vb.config.cookie_timeout) {
         soup_cookie_set_expires(new_cookie, soup_date_new_from_now(vb.config.cookie_timeout));
     }
     SOUP_COOKIE_JAR_CLASS(cookiejar_parent_class)->changed(self, old_cookie, new_cookie);