From: Fabian Keil Date: Sun, 11 Nov 2012 12:37:42 +0000 (+0000) Subject: Only call time() in server_set_cookie() if the time is actually needed X-Git-Tag: v_3_0_20~177 X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=commitdiff_plain;h=3bf236a994cf33dce3e88b8eb1f93e46635adc08 Only call time() in server_set_cookie() if the time is actually needed --- diff --git a/parsers.c b/parsers.c index 710cccee..9f58a9d7 100644 --- a/parsers.c +++ b/parsers.c @@ -1,4 +1,4 @@ -const char parsers_rcs[] = "$Id: parsers.c,v 1.260 2012/10/29 12:04:42 fabiankeil Exp $"; +const char parsers_rcs[] = "$Id: parsers.c,v 1.261 2012/11/09 10:46:06 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/parsers.c,v $ @@ -3833,8 +3833,6 @@ static jb_err server_set_cookie(struct client_state *csp, char **header) time_t now; time_t cookie_time; - time(&now); - if ((csp->action->flags & ACTION_CRUNCH_INCOMING_COOKIES) != 0) { log_error(LOG_LEVEL_HEADER, "Crunching incoming cookie: %s", *header); @@ -3857,6 +3855,8 @@ static jb_err server_set_cookie(struct client_state *csp, char **header) cur_tag++; } + time(&now); + /* Loop through each tag in the cookie */ while (*cur_tag) {