current client-tags.c,1.7,1.8

Fabian Keil <[email protected]> Mon, 20 Feb 2017 13:47:53 +0000
Newsgroups gmane.comp.web.privoxy.cvs
Message-ID <[email protected]>
Update of /cvsroot/ijbswa/current
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv15446

Modified Files:
	client-tags.c 
Log Message:
add_tag_for_client(): Set time_to_live properly

Previously the time_to_live was always set for the first tag.
Attempts to temporarily enable a tag would result in enabling
it permanently unless no tag was enabled already.

D'oh.


Index: client-tags.c
===================================================================
RCS file: /cvsroot/ijbswa/current/client-tags.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** client-tags.c	20 Feb 2017 13:47:04 -0000	1.7
--- client-tags.c	20 Feb 2017 13:47:51 -0000	1.8
***************
*** 373,377 ****
           enabled_tags->next = zalloc_or_die(sizeof(struct client_specific_tag));
           enabled_tags->next->name = strdup_or_die(tag);
!          clients_with_tags->tags->end_of_life = time_to_live ?
              (time(NULL) + time_to_live) : 0;
           enabled_tags->next->prev = enabled_tags;
--- 373,377 ----
           enabled_tags->next = zalloc_or_die(sizeof(struct client_specific_tag));
           enabled_tags->next->name = strdup_or_die(tag);
!          enabled_tags->next->end_of_life = time_to_live ?
              (time(NULL) + time_to_live) : 0;
           enabled_tags->next->prev = enabled_tags;


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot