Ignore:
Timestamp:
2012-08-02T08:27:41+02:00 (3 years ago)
Author:
Xuefer
Message:

fixed #39: ini_set never work for xcache.coverager setting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/mod_coverager/xc_coverager.c

    r1060 r1117  
    245245static void xc_coverager_enable(TSRMLS_D) /* {{{ */
    246246{
    247     XG(coverage_enabled) = 1;
     247    XG(coverager_enabled) = 1;
    248248}
    249249/* }}} */
    250250static void xc_coverager_disable(TSRMLS_D) /* {{{ */
    251251{
    252     XG(coverage_enabled) = 0;
     252    XG(coverager_enabled) = 0;
    253253}
    254254/* }}} */
     
    257257{
    258258    if (XG(coverager)) {
    259         xc_coverager_enable(TSRMLS_C);
     259        if (XG(coverager_autostart)) {
     260            xc_coverager_enable(TSRMLS_C);
     261        }
    260262#ifdef ZEND_COMPILE_EXTENDED_INFO
    261263        CG(compiler_options) |= ZEND_COMPILE_EXTENDED_INFO;
     
    265267    }
    266268    else {
    267         XG(coverage_enabled) = 0;
     269        XG(coverager_enabled) = 0;
    268270    }
    269271    return SUCCESS;
     
    469471    TSRMLS_FETCH();
    470472
    471     if (XG(coverages) && XG(coverage_enabled)) {
     473    if (XG(coverages) && XG(coverager_enabled)) {
    472474        int size = xc_coverager_get_op_array_size_no_tail(op_array);
    473475        int oplineno = (*EG(opline_ptr)) - op_array->opcodes;
     
    631633/* {{{ PHP_INI */
    632634PHP_INI_BEGIN()
    633     STD_PHP_INI_BOOLEAN("xcache.coverager"      ,        "0", PHP_INI_ALL,    OnUpdateBool,         coverager,         zend_xcache_globals, xcache_globals)
     635    STD_PHP_INI_BOOLEAN("xcache.coverager",              "0", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateBool, coverager,           zend_xcache_globals, xcache_globals)
     636    STD_PHP_INI_BOOLEAN("xcache.coverager_autostart",    "1", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateBool, coverager_autostart, zend_xcache_globals, xcache_globals)
    634637    PHP_INI_ENTRY1     ("xcache.coveragedump_directory",  "", PHP_INI_SYSTEM, xcache_OnUpdateDummy, NULL)
    635638PHP_INI_END()
     
    644647        covdumpdir = NULL;
    645648    }
    646     php_info_print_table_row(2, "Coverage Auto Dumper", XG(coverager) && covdumpdir ? "enabled" : "disabled");
     649    php_info_print_table_row(2, "Coverage Started", XG(coverager_started) && covdumpdir ? "On" : "Off");
    647650    php_info_print_table_end();
    648651
Note: See TracChangeset for help on using the changeset viewer.