Changeset 595 for branches/1.3/xcache.c


Ignore:
Timestamp:
2009-07-05T06:53:27+02:00 (5 years ago)
Author:
moo
Message:

merged r317 from trunk: cacher fix stat and skip user stream

Location:
branches/1.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/1.3

    • Property svn:mergeinfo changed
      /trunkmerged: 317
  • branches/1.3/xcache.c

    r593 r595  
    651651        if (VCWD_STAT(filepath, pbuf) == 0) { 
    652652            free_alloca(paths); 
    653             return 0; 
     653            return SUCCESS; 
    654654        } 
    655655    } 
     
    657657    free_alloca(paths); 
    658658 
    659     return 1; 
     659    return FAILURE; 
    660660} 
    661661/* }}} */ 
     
    703703 
    704704    if (!filename || !SG(request_info).path_translated) { 
    705         return 0; 
     705        return FAILURE; 
     706    } 
     707 
     708    if (strstr(filename, "://") != NULL) { 
     709        return FAILURE; 
    706710    } 
    707711 
     
    721725        if (IS_ABSOLUTE_PATH(filename, strlen(filename))) { 
    722726            if (VCWD_STAT(filename, pbuf) != 0) { 
    723                 return 0; 
     727                return FAILURE; 
    724728            } 
    725729            goto stat_done; 
     
    737741 
    738742            if (VCWD_STAT(filename, pbuf) != 0) { 
    739                 return 0; 
     743                return FAILURE; 
    740744            } 
    741745            goto stat_done; 
     
    744748 
    745749        /* use include_path */ 
    746         if (xc_stat(filename, PG(include_path), pbuf TSRMLS_CC) != 0) {    
    747             return 0; 
     750        if (xc_stat(filename, PG(include_path), pbuf TSRMLS_CC) != SUCCESS) { 
     751            return FAILURE; 
    748752        } 
    749753 
     
    753757        delta = XG(request_time) - pbuf->st_mtime; 
    754758        if (abs(delta) < 2 && !xc_test) { 
    755             return 0; 
     759            return FAILURE; 
    756760        } 
    757761 
     
    779783        filename = expand_filepath(filename, opened_path_buffer TSRMLS_CC); 
    780784        if (filename == NULL) { 
    781             return 0; 
     785            return FAILURE; 
    782786        } 
    783787    } 
     
    793797 
    794798    xce->type = XC_TYPE_PHP; 
    795     return 1; 
     799    return SUCCESS; 
     800} 
     801/* }}} */ 
     802static inline xc_hash_value_t xc_php_hash_md5(xc_entry_data_php_t *php TSRMLS_DC) /* {{{ */ 
     803{ 
     804    return HASH_STR_S(php->md5, sizeof(php->md5)); 
    796805} 
    797806/* }}} */ 
     
    866875    filename = h->opened_path ? h->opened_path : h->filename; 
    867876    xce.data.php = &php; 
    868     if (!xc_entry_init_key_php(&xce, filename, opened_path_buffer TSRMLS_CC)) { 
     877    if (xc_entry_init_key_php(&xce, filename, opened_path_buffer TSRMLS_CC) != SUCCESS) { 
    869878        return old_compile_file(h, type TSRMLS_CC); 
    870879    } 
Note: See TracChangeset for help on using the changeset viewer.