|
|
| version 1.16.2.7.2.5, 2003/03/24 17:52:19 | version 1.17.4.1, 2003/09/24 14:32:06 |
|---|---|
| Line 37 static void expire_connections( | Line 37 static void expire_connections( |
| Stylesheet_manager::connection_cache_type::key_type /*key*/, | Stylesheet_manager::connection_cache_type::key_type /*key*/, |
| Stylesheet_manager::connection_cache_type::value_type stack, | Stylesheet_manager::connection_cache_type::value_type stack, |
| time_t older_dies) { | time_t older_dies) { |
| for(int i=0; i<=stack->top_index(); i++) | for(size_t i=0; i<stack->top(); i++) |
| expire_connection(*stack->get(i), older_dies); | expire_connection(*stack->get(i), older_dies); |
| } | } |
| Line 51 void Stylesheet_connection::close() { | Line 51 void Stylesheet_connection::close() { |
| Stylesheet_manager::Stylesheet_manager(): prev_expiration_pass_time(0) { | Stylesheet_manager::Stylesheet_manager(): prev_expiration_pass_time(0) { |
| cache_managers.put(StringBody("stylesheet"), this); | cache_managers.put(String::Body("stylesheet"), this); |
| } | } |
| Stylesheet_manager::~Stylesheet_manager() { | Stylesheet_manager::~Stylesheet_manager() { |
| Line 76 Stylesheet_connection* Stylesheet_manage | Line 76 Stylesheet_connection* Stylesheet_manage |
| SYNCHRONIZED; | SYNCHRONIZED; |
| if(connection_cache_type::value_type connections=connection_cache.get(file_spec)) | if(connection_cache_type::value_type connections=connection_cache.get(file_spec)) |
| while(connections->top_index()>=0) { // there are cached stylesheets to that 'file_spec' | while(!connections->is_empty()) { // there are cached stylesheets to that 'file_spec' |
| Stylesheet_connection* result=connections->pop(); | Stylesheet_connection* result=connections->pop(); |
| if(result->connected()) // not expired? | if(result->connected()) // not expired? |
| return result; | return result; |
| Line 91 void Stylesheet_manager::put_connection_ | Line 91 void Stylesheet_manager::put_connection_ |
| connection_cache_type::value_type connections=connection_cache.get(file_spec); | connection_cache_type::value_type connections=connection_cache.get(file_spec); |
| if(!connections) { // there are no cached stylesheets to that 'file_spec' yet? | if(!connections) { // there are no cached stylesheets to that 'file_spec' yet? |
| connections=connection_cache_type::value_type(new connection_cache_type::value_type); | connections=new connection_cache_value_type; |
| connection_cache.put(file_spec, connections); | connection_cache.put(file_spec, connections); |
| } | } |
| connections->push(&connection); | connections->push(&connection); |