Show
Ignore:
Timestamp:
04/26/05 16:48:00 (4 years ago)
Author:
zoeloelip
Message:

* This commit contains the first part of the code refactoring. In this part

the monolitic eaccelerator.c file has been split up in more logical blocks.

cache.c/cache.h contains the procedure for shm.c/session.c/content.c to add user_cache entries to the ea cache
shm.c/shm.h contains the eaccelerator shared memory functions
session.c/session.h contains the session related stuff
webui.c/webui.h contains all stuff related to the webinterface and disassembler
debug.c/debug.h contains some procedures to print debug information
content.h contains the php content caching prototype instead of eaccelerator.h

* Added --without-eaccelerator-shared-memory and --without-eaccelerator-webui configure switches

Bugfixes included:
* Patch 1188510 eaccelerator_compile_file typos
* Patch 1189792 session life time patch
* Patch 1167069 HAS_ATTRIBUTE fix with FreeBSD 4.x
* Patch 1166707 loader patch for OOP functions in PHP5 (only rapidly tested but also seemed ok to segv)
* string in eaccelerator_put_page (content.c line 162) which wasn't freed (Thanks to The_Surfer)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • eaccelerator/trunk/content.c

    r21 r64  
    33   | eAccelerator project                                                 | 
    44   +----------------------------------------------------------------------+ 
    5    | Copyright (c) 2004 eAccelerator                                      | 
    6    | http://eaccelerator.sourceforge.net                                  | 
     5   | Copyright (c) 2004 - 2005 eAccelerator                               | 
     6   | http://eaccelerator.net                                                     | 
    77   +----------------------------------------------------------------------+ 
    88   | This program is free software; you can redistribute it and/or        | 
     
    3333#ifdef WITH_EACCELERATOR_CONTENT_CACHING 
    3434 
     35#include "cache.h" 
     36#include "content.h" 
    3537#include "SAPI.h" 
    3638 
    3739#define EACCELERATOR_COMPRESS_MIN 128 
    3840 
     41eaccelerator_cache_place eaccelerator_content_cache_place = eaccelerator_shm_and_disk; 
     42 
    3943static int (*eaccelerator_old_header_handler)(sapi_header_struct *sapi_header, sapi_headers_struct *sapi_headers TSRMLS_DC); 
     44 
     45PHP_INI_MH (eaccelerator_OnUpdateContentCachePlace) 
     46{ 
     47        if (strncasecmp ("shm_and_disk", new_value,  
     48                sizeof ("shm_and_disk")) == 0) 
     49        { 
     50                eaccelerator_content_cache_place = eaccelerator_shm_and_disk; 
     51        } 
     52        else if (strncasecmp ("shm", new_value,  
     53                sizeof ("shm")) == 0) 
     54        { 
     55                eaccelerator_content_cache_place = eaccelerator_shm; 
     56        } 
     57        else if (strncasecmp ("shm_only", new_value,  
     58                sizeof ("shm_only")) == 0) 
     59        { 
     60                eaccelerator_content_cache_place = eaccelerator_shm_only; 
     61        } 
     62        else if (strncasecmp ("disk_only", new_value,  
     63                sizeof ("disk_only")) == 0) 
     64        { 
     65                eaccelerator_content_cache_place = eaccelerator_disk_only; 
     66        } 
     67        else if (strncasecmp ("none", new_value,  
     68                sizeof ("none")) == 0) 
     69        { 
     70                eaccelerator_content_cache_place = eaccelerator_none; 
     71        } 
     72        return SUCCESS; 
     73} 
    4074 
    4175static int eaccelerator_check_compression(sapi_header_struct *sapi_header TSRMLS_DC) { 
     
    131165      add_next_index_stringl(headers, s, h->header_len+1, 0); 
    132166      p = p->next; 
     167      efree(s); 
    133168    } 
    134169    add_assoc_zval(&cache_array, "headers", headers);