Lines Matching refs:blacklist
52 void zend_accel_blacklist_init(zend_blacklist *blacklist) in zend_accel_blacklist_init() argument
54 blacklist->pos = 0; in zend_accel_blacklist_init()
55 blacklist->size = ZEND_BLACKLIST_BLOCK_SIZE; in zend_accel_blacklist_init()
57 if (blacklist->entries != NULL) { in zend_accel_blacklist_init()
58 zend_accel_blacklist_shutdown(blacklist); in zend_accel_blacklist_init()
61 …blacklist->entries = (zend_blacklist_entry *) calloc(sizeof(zend_blacklist_entry), blacklist->size… in zend_accel_blacklist_init()
62 if (!blacklist->entries) { in zend_accel_blacklist_init()
66 blacklist->regexp_list = NULL; in zend_accel_blacklist_init()
74 static void zend_accel_blacklist_update_regexp(zend_blacklist *blacklist) in zend_accel_blacklist_update_regexp() argument
81 if (blacklist->pos == 0) { in zend_accel_blacklist_update_regexp()
86 regexp_list_it = &(blacklist->regexp_list); in zend_accel_blacklist_update_regexp()
93 for (i = 0; i < blacklist->pos; ) { in zend_accel_blacklist_update_regexp()
94 c = blacklist->entries[i].path; in zend_accel_blacklist_update_regexp()
95 if (p + blacklist->entries[i].path_length < end) { in zend_accel_blacklist_update_regexp()
161 if (*c || i == blacklist->pos - 1) { in zend_accel_blacklist_update_regexp()
197 void zend_accel_blacklist_shutdown(zend_blacklist *blacklist) in zend_accel_blacklist_shutdown() argument
199 zend_blacklist_entry *p = blacklist->entries, *end = blacklist->entries + blacklist->pos; in zend_accel_blacklist_shutdown()
205 free(blacklist->entries); in zend_accel_blacklist_shutdown()
206 blacklist->entries = NULL; in zend_accel_blacklist_shutdown()
207 if (blacklist->regexp_list) { in zend_accel_blacklist_shutdown()
208 zend_regexp_list *temp, *it = blacklist->regexp_list; in zend_accel_blacklist_shutdown()
218 static inline void zend_accel_blacklist_allocate(zend_blacklist *blacklist) in zend_accel_blacklist_allocate() argument
220 if (blacklist->pos == blacklist->size) { in zend_accel_blacklist_allocate()
221 blacklist->size += ZEND_BLACKLIST_BLOCK_SIZE; in zend_accel_blacklist_allocate()
222 …blacklist->entries = (zend_blacklist_entry *) realloc(blacklist->entries, sizeof(zend_blacklist_en… in zend_accel_blacklist_allocate()
227 static void zend_accel_blacklist_loadone(zend_blacklist *blacklist, char *filename) in zend_accel_blacklist_loadone() argument
229 void zend_accel_blacklist_load(zend_blacklist *blacklist, char *filename) in zend_accel_blacklist_loadone()
293 zend_accel_blacklist_allocate(blacklist); in zend_accel_blacklist_loadone()
294 blacklist->entries[blacklist->pos].path_length = path_length; in zend_accel_blacklist_loadone()
295 blacklist->entries[blacklist->pos].path = (char *)malloc(path_length + 1); in zend_accel_blacklist_loadone()
296 if (!blacklist->entries[blacklist->pos].path) { in zend_accel_blacklist_loadone()
301 blacklist->entries[blacklist->pos].id = blacklist->pos; in zend_accel_blacklist_loadone()
302 memcpy(blacklist->entries[blacklist->pos].path, real_path, path_length + 1); in zend_accel_blacklist_loadone()
303 blacklist->pos++; in zend_accel_blacklist_loadone()
309 zend_accel_blacklist_update_regexp(blacklist); in zend_accel_blacklist_loadone()
313 void zend_accel_blacklist_load(zend_blacklist *blacklist, char *filename) argument
330 zend_accel_blacklist_loadone(blacklist, globbuf.gl_pathv[i]);
337 zend_bool zend_accel_blacklist_is_blacklisted(zend_blacklist *blacklist, char *verify_path) argument
340 zend_regexp_list *regexp_list_it = blacklist->regexp_list;
355 void zend_accel_blacklist_apply(zend_blacklist *blacklist, blacklist_apply_func_arg_t func, void *a… argument
359 for (i = 0; i < blacklist->pos; i++) {
360 func(&blacklist->entries[i], argument);