~ubuntu-branches/ubuntu/karmic/apache2/karmic-security

« back to all changes in this revision

Viewing changes to modules/cache/cache_cache.c

  • Committer: Bazaar Package Importer
  • Author(s): Stefan Fritsch
  • Date: 2008-10-01 11:50:18 UTC
  • mfrom: (34 intrepid)
  • mto: (14.2.1 squeeze)
  • mto: This revision was merged to the branch mainline in revision 40.
  • Revision ID: james.westby@ubuntu.com-20081001115018-1022gw429ce4pqyp
Tags: 2.2.9-10
Regression fix from upstream svn for mod_proxy_http:
Don't trigger a retry by the client if a failure to read the response line
was the result of a timeout.

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
    cache_cache_free *free_entry;
45
45
};
46
46
 
47
 
CACHE_DECLARE(cache_cache_t *)cache_init(int max_entries,
 
47
cache_cache_t* cache_init(int max_entries,
48
48
                                         apr_size_t max_size,
49
49
                                         cache_pqueue_get_priority get_pri,
50
50
                                         cache_pqueue_set_priority set_pri,
75
75
    return tmp;
76
76
}
77
77
 
78
 
CACHE_DECLARE(void) cache_free(cache_cache_t *c)
 
78
void cache_free(cache_cache_t *c)
79
79
{
80
80
    cache_pq_free(c->pq);
81
81
    cache_hash_free(c->ht);
83
83
}
84
84
 
85
85
 
86
 
CACHE_DECLARE(void*) cache_find(cache_cache_t* c, const char *key)
 
86
void* cache_find(cache_cache_t* c, const char *key)
87
87
{
88
 
    void *e;
89
 
 
90
 
    e = cache_hash_get(c->ht, key, CACHE_HASH_KEY_STRING);
91
 
    if (!e)
92
 
        return NULL;
93
 
 
94
 
    return e;
 
88
    return cache_hash_get(c->ht, key, CACHE_HASH_KEY_STRING);
95
89
}
96
90
 
97
 
CACHE_DECLARE(void) cache_update(cache_cache_t* c, void *entry)
 
91
void cache_update(cache_cache_t* c, void *entry)
98
92
{
99
93
    long old_priority;
100
94
    long new_priority;
105
99
    cache_pq_change_priority(c->pq, old_priority, new_priority, entry);
106
100
}
107
101
 
108
 
CACHE_DECLARE(void) cache_insert(cache_cache_t* c, void *entry)
 
102
void cache_insert(cache_cache_t* c, void *entry)
109
103
{
110
104
    void *ejected = NULL;
111
105
    long priority;
138
132
    cache_hash_set(c->ht, c->key_entry(entry), CACHE_HASH_KEY_STRING, entry);
139
133
}
140
134
 
141
 
CACHE_DECLARE(void *) cache_pop(cache_cache_t *c)
 
135
void* cache_pop(cache_cache_t *c)
142
136
{
143
137
    void *entry;
144
138
 
156
150
    return entry;
157
151
}
158
152
 
159
 
CACHE_DECLARE(apr_status_t) cache_remove(cache_cache_t *c, void *entry)
 
153
apr_status_t cache_remove(cache_cache_t *c, void *entry)
160
154
{
161
155
    apr_size_t entry_size = c->size_entry(entry);
162
156
    apr_status_t rc;