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(blacklist->size, sizeof(zend_blacklist_entry)… 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
83 if (blacklist->pos == 0) { in zend_accel_blacklist_update_regexp()
88 regexp_list_it = &(blacklist->regexp_list); in zend_accel_blacklist_update_regexp()
95 for (i = 0; i < blacklist->pos; ) { in zend_accel_blacklist_update_regexp()
96 c = blacklist->entries[i].path; in zend_accel_blacklist_update_regexp()
97 if (p + blacklist->entries[i].path_length < end) { in zend_accel_blacklist_update_regexp()
163 if (*c || i == blacklist->pos - 1) { in zend_accel_blacklist_update_regexp()
208 void zend_accel_blacklist_shutdown(zend_blacklist *blacklist) in zend_accel_blacklist_shutdown() argument
210 if (!blacklist->entries) { in zend_accel_blacklist_shutdown()
214 zend_blacklist_entry *p = blacklist->entries, *end = blacklist->entries + blacklist->pos; in zend_accel_blacklist_shutdown()
219 free(blacklist->entries); in zend_accel_blacklist_shutdown()
220 blacklist->entries = NULL; in zend_accel_blacklist_shutdown()
221 if (blacklist->regexp_list) { in zend_accel_blacklist_shutdown()
222 zend_regexp_list *temp, *it = blacklist->regexp_list; in zend_accel_blacklist_shutdown()
232 static inline void zend_accel_blacklist_allocate(zend_blacklist *blacklist) in zend_accel_blacklist_allocate() argument
234 if (blacklist->pos == blacklist->size) { in zend_accel_blacklist_allocate()
235 blacklist->size += ZEND_BLACKLIST_BLOCK_SIZE; in zend_accel_blacklist_allocate()
236 …blacklist->entries = (zend_blacklist_entry *) realloc(blacklist->entries, sizeof(zend_blacklist_en… in zend_accel_blacklist_allocate()
240 static void zend_accel_blacklist_loadone(zend_blacklist *blacklist, char *filename) in zend_accel_blacklist_loadone() argument
303 zend_accel_blacklist_allocate(blacklist); in zend_accel_blacklist_loadone()
304 blacklist->entries[blacklist->pos].path_length = path_length; in zend_accel_blacklist_loadone()
305 blacklist->entries[blacklist->pos].path = (char *)malloc(path_length + 1); in zend_accel_blacklist_loadone()
306 if (!blacklist->entries[blacklist->pos].path) { in zend_accel_blacklist_loadone()
311 blacklist->entries[blacklist->pos].id = blacklist->pos; in zend_accel_blacklist_loadone()
312 memcpy(blacklist->entries[blacklist->pos].path, real_path, path_length + 1); in zend_accel_blacklist_loadone()
313 blacklist->pos++; in zend_accel_blacklist_loadone()
321 void zend_accel_blacklist_load(zend_blacklist *blacklist, char *filename) argument
339 zend_accel_blacklist_loadone(blacklist, globbuf.gl_pathv[i]);
344 zend_accel_blacklist_loadone(blacklist, filename);
346 zend_accel_blacklist_update_regexp(blacklist);
349 bool zend_accel_blacklist_is_blacklisted(zend_blacklist *blacklist, char *verify_path, size_t verif… argument
352 zend_regexp_list *regexp_list_it = blacklist->regexp_list;
376 void zend_accel_blacklist_apply(zend_blacklist *blacklist, blacklist_apply_func_arg_t func, void *a… argument
380 for (i = 0; i < blacklist->pos; i++) {
381 func(&blacklist->entries[i], argument);