Changeset 1811
- Timestamp:
- 04/19/2007 09:06:44 PM (17 months ago)
- Location:
- trunk/src
- Files:
-
- 3 modified
-
configfile-glue.c (modified) (2 diffs)
-
configfile.h (modified) (1 diff)
-
mod_magnet.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/configfile-glue.c
r1810 r1811 534 534 } 535 535 536 void config_cond_cache_reset(server *srv, connection *con) { 537 size_t i; 538 539 for (i = 0; i < srv->config_context->used - 1; i++) { 540 con->cond_cache[i].result = COND_RESULT_UNSET; 541 con->cond_cache[i].patterncount = 0; 542 con->cond_cache[i].comp_value = NULL; 543 } 544 545 for (i = 0; i < COMP_LAST_ELEMENT; i++) { 546 con->conditional_is_valid[i] = 0; 547 } 548 } 549 536 /** 537 * reset the config-cache for a named item 538 * 539 * if the item is COND_LAST_ELEMENT we reset all items 540 */ 550 541 void config_cond_cache_reset_item(server *srv, connection *con, comp_key_t item) { 551 542 size_t i; 552 543 553 544 for (i = 0; i < srv->config_context->used; i++) { 554 if (con->cond_cache[i].comp_type == item) { 545 if (item == COMP_LAST_ELEMENT || 546 con->cond_cache[i].comp_type == item) { 555 547 con->cond_cache[i].result = COND_RESULT_UNSET; 556 548 con->cond_cache[i].patterncount = 0; … … 560 552 } 561 553 554 /** 555 * reset the config cache to its initial state at connection start 556 */ 557 void config_cond_cache_reset(server *srv, connection *con) { 558 size_t i; 559 560 config_cond_cache_reset_all_items(srv, con); 561 562 for (i = 0; i < COMP_LAST_ELEMENT; i++) { 563 con->conditional_is_valid[i] = 0; 564 } 565 } 562 566 563 567 int config_check_cond(server *srv, connection *con, data_config *dc) { -
trunk/src/configfile.h
r1810 r1811 25 25 LI_API void config_cond_cache_reset_item(server *srv, connection *con, comp_key_t item); 26 26 27 #define config_cond_cache_reset_all_items(srv, con) \ 28 config_cond_cache_reset_item(srv, con, COMP_LAST_ELEMENT); 29 27 30 #endif -
trunk/src/mod_magnet.c
r1810 r1811 835 835 836 836 /* reset conditional cache. */ 837 for (i = 0; i < COMP_LAST_ELEMENT; i++) { 838 config_cond_cache_reset_item(srv, con, i); 839 } 837 config_cond_cache_reset_all_items(srv, con); 840 838 841 839 return ret;

