Changeset 221

Show
Ignore:
Timestamp:
06/27/06 14:49:05 (2 years ago)
Author:
bart
Message:

* Redone the fix for bug #109, don't keep our own list of restored files,

we use the included_files hash from the zend engine.

* Included the fix from ticket #94 for zts

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • eaccelerator/trunk/ChangeLog

    r220 r221  
    44        * Fix for bug #109, #31 and SF-1102070 
    55        * Cleaned-up RINIT a bit for hostname determining 
     6        * Redone the fix for bug #109, don't keep our own list of restored files, 
     7          we use the included_files hash from the zend engine. 
     8        * Included the fix from ticket #94 for zts 
    69 
    7102006-06-26  Bart Vanbrabant <bart.vanbrabant at zoeloelip.be> 
  • eaccelerator/trunk/eaccelerator.c

    r220 r221  
    936936      EAG(used_entries) = (void*)used; 
    937937      EAG(mem) = op_array->filename; 
    938           /* only restore the classes and functions when we restore this script  
    939            * for the first time.  
    940            */ 
    941       if (!zend_hash_exists(&EAG(restored), p->realfilename, strlen(p->realfilename))) { 
    942             for (e = p->c_head; e!=NULL; e = e->next) { 
     938                        /* if a scripts has been restored, don't restore the functions and classes again */ 
     939            if (!zend_hash_exists(&EG(included_files), op_array->filename, strlen(op_array->filename) + 1)) { 
     940              for (e = p->c_head; e!=NULL; e = e->next) { 
    943941          restore_class(e TSRMLS_CC); 
    944942        } 
     
    946944          restore_function(e TSRMLS_CC); 
    947945        } 
    948                 zend_hash_add(&EAG(restored), p->realfilename, strlen(p->realfilename), NULL, 0, NULL);   
    949           } 
    950           EAG(mem) = p->realfilename; 
     946            } 
     947            EAG(mem) = p->realfilename; 
    951948    } 
    952949  } 
     
    12581255  realname[0] = '\000'; 
    12591256#endif 
    1260  
    12611257  DBG(ea_debug_start_time, (&tv_start)); 
    12621258  DBG(ea_debug_printf, (EA_DEBUG, "[%d] Enter COMPILE\n",getpid())); 
     
    20031999    return FAILURE; 
    20042000  } 
    2005 /*??? FIXME 
    2006   ZEND_INIT_MODULE_GLOBALS(eaccelerator, eaccelerator_init_globals, eaccelerator_globals_dtor); 
    2007 */ 
    20082001  ZEND_INIT_MODULE_GLOBALS(eaccelerator, eaccelerator_init_globals, NULL); 
    20092002  REGISTER_INI_ENTRIES(); 
     
    20772070  ea_debug_shutdown(); 
    20782071  UNREGISTER_INI_ENTRIES(); 
    2079 #ifndef ZTS 
     2072#ifdef ZTS 
     2073        ts_free_id(eaccelerator_globals_id); 
     2074#else 
    20802075  eaccelerator_globals_dtor(&eaccelerator_globals TSRMLS_CC); 
    20812076#endif 
     
    21372132  } 
    21382133 
    2139         /* initialise the hash that contains the restored files */ 
    2140         zend_hash_init(&EAG(restored), 0, NULL, NULL, 0); 
    2141  
    21422134        DBG(ea_debug_printf, (EA_DEBUG, "[%d] Leave RINIT\n",getpid())); 
    21432135#ifdef DEBUG 
     
    21712163                return SUCCESS; 
    21722164        } 
    2173         ea_debug_hash_display(&EAG(restored)); 
    2174         zend_hash_destroy(&EAG(restored)); 
    21752165#ifdef WITH_EACCELERATOR_CRASH_DETECTION 
    21762166#ifdef SIGSEGV 
  • eaccelerator/trunk/eaccelerator.h

    r220 r221  
    449449char *allowed_admin_path; 
    450450HashTable strings; 
    451 HashTable restored; 
    452451zend_class_entry *class_entry; 
    453452mm_cond_entry *cond_list;