php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login

Patch wincache_session_expire_duplicate_bug for WinCache Bug #65838

Patch version 2013-10-05 12:22 UTC

Return to Bug #65838 | Download this patch
Patch Revisions:

Developer: zws@ahtvu.ah.cn

diff -uNr WINCACHE-1.3.5.0/wincache_zvcache.c WINCACHE-1.3.5.0.bak/wincache_zvcache.c
--- WINCACHE-1.3.5.0/wincache_zvcache.c	2013-10-05 20:06:11.000000000 +0800
+++ WINCACHE-1.3.5.0.bak/wincache_zvcache.c	2013-10-05 20:03:07.000000000 +0800
@@ -1062,7 +1062,6 @@
     {
         if(strcmp(pcache->zvmemaddr + pvalue->keystr, key) == 0)
         {
-        /*
             if(pvalue->ttlive > 0)
             {
                 /* Check if the entry is not expired and */
@@ -1078,8 +1077,6 @@
                 /* ttlive 0 means entry is valid unless deleted */
                 break;
             }
-        */
-            break;
         }
 
         pvalue = ZVCACHE_VALUE(pcache->zvalloc, pvalue->next_value);
@@ -1369,7 +1366,7 @@
             }
 
             /* Remove the entry from cache if its expired */
-            tickdiff = utils_ticksdiff(ticks, ptemp->use_ticks) / 1000;
+            tickdiff = utils_ticksdiff(ticks, ptemp->add_ticks) / 1000;
             if(tickdiff >= ptemp->ttlive)
             {
                 remove_zvcache_entry(pcache, sindex, ptemp);
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 22:01:27 2024 UTC