gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnurl] 117/178: cookies: ensure that we have cookies befor


From: gnunet
Subject: [GNUnet-SVN] [gnurl] 117/178: cookies: ensure that we have cookies before writing jar
Date: Wed, 23 May 2018 12:25:52 +0200

This is an automated email from the git hooks/post-receive script.

ng0 pushed a commit to branch master
in repository gnurl.

commit 732d093835b165e7534e09fad7ef09e0e6098566
Author: Daniel Gustafsson <address@hidden>
AuthorDate: Tue Apr 24 22:42:41 2018 +0200

    cookies: ensure that we have cookies before writing jar
    
    The jar should be written iff there are cookies, so ensure that we still
    have cookies after expiration to avoid creating an empty file.
    
    Closes #2529
---
 lib/cookie.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/cookie.c b/lib/cookie.c
index 9c90c2a38..5eb3c1209 100644
--- a/lib/cookie.c
+++ b/lib/cookie.c
@@ -1442,6 +1442,10 @@ static int cookie_output(struct CookieInfo *c, const 
char *dumphere)
   /* at first, remove expired cookies */
   remove_expired(c);
 
+  /* make sure we still have cookies after expiration */
+  if(0 == c->numcookies)
+    return 0;
+
   if(!strcmp("-", dumphere)) {
     /* use stdout */
     out = stdout;

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]