Changeset 261

Show
Ignore:
Timestamp:
08/03/06 13:11:09 (2 years ago)
Author:
bart
Message:

ea_info and ea_dasm: if eaccelerator_mm_instance is NULL, just return

null and don't do something.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • eaccelerator/branches/0.9.5/ChangeLog

    r260 r261  
    33        * zend_do_inheritance can't be called with TSRMLS_CC when using  
    44          php 4, this also means that eAccelerator won't work with threading! 
     5        * ea_info and ea_dasm: if eaccelerator_mm_instance is NULL, just return 
     6          null and don't do something. 
    57 
    682006-07-30  Bart Vanbrabant <bart.vanbrabant at zoeloelip.be> 
  • eaccelerator/branches/0.9.5/ea_dasm.c

    r229 r261  
    556556                return; 
    557557 
    558         if (php_check_open_basedir(file TSRMLS_CC)) { 
     558        if (eaccelerator_mm_instance == NULL || php_check_open_basedir(file TSRMLS_CC)) { 
    559559                RETURN_NULL(); 
    560560        } 
    561      
     561 
    562562    p = get_cache_entry(file); 
    563563    if (p == NULL) { 
  • eaccelerator/branches/0.9.5/ea_info.c

    r237 r261  
    220220{ 
    221221    zend_bool enable; 
    222      
     222 
     223        if (eaccelerator_mm_instance == NULL) { 
     224                RETURN_NULL(); 
     225        } 
     226 
    223227        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "b", &enable) == FAILURE) 
    224228                return; 
     
    246250    zend_bool enable; 
    247251     
     252        if (eaccelerator_mm_instance == NULL) { 
     253                RETURN_NULL(); 
     254        } 
     255 
    248256        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "b", &enable) == FAILURE) 
    249257                return; 
     
    271279        time_t t; 
    272280 
     281        if (eaccelerator_mm_instance == NULL) { 
     282                RETURN_NULL(); 
     283        } 
     284 
    273285    if (!isAdminAllowed(TSRMLS_C)) { 
    274286        zend_error(E_WARNING, NOT_ADMIN_WARNING); 
     
    294306        unsigned int i; 
    295307        mm_cache_entry *p; 
     308 
     309        if (eaccelerator_mm_instance == NULL) { 
     310                RETURN_NULL(); 
     311        } 
    296312 
    297313    if (!isAdminAllowed(TSRMLS_C)) { 
     
    376392    shm = (char *)mm_shm_type(); 
    377393    sem = (char *)mm_sem_type(); 
     394 
     395        if (eaccelerator_mm_instance == NULL) { 
     396                RETURN_NULL(); 
     397        } 
     398 
    378399        available = mm_available (eaccelerator_mm_instance->mm); 
    379400 
     
    409430    int i; 
    410431 
    411     if (!isAdminAllowed(TSRMLS_C)) { 
     432        if (eaccelerator_mm_instance == NULL) { 
     433                RETURN_NULL(); 
     434        } 
     435 
     436        if (!isAdminAllowed(TSRMLS_C)) { 
    412437        zend_error(E_WARNING, NOT_ADMIN_WARNING); 
    413438        RETURN_NULL(); 
     
    442467    zval *script; 
    443468 
     469        if (eaccelerator_mm_instance == NULL) { 
     470                RETURN_NULL(); 
     471        } 
     472 
    444473    if (!isAdminAllowed(TSRMLS_C)) { 
    445474        zend_error(E_WARNING, NOT_ADMIN_WARNING); 
     
    469498PHP_FUNCTION(eaccelerator_list_keys) 
    470499{ 
    471         if (eaccelerator_list_keys(return_value TSRMLS_CC)) { 
     500        if (eaccelerator_mm_instance == NULL && eaccelerator_list_keys(return_value TSRMLS_CC)) { 
    472501                return; 
    473502        } else {