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()
61blacklist->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
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()
206 void zend_accel_blacklist_shutdown(zend_blacklist *blacklist) in zend_accel_blacklist_shutdown() argument
208 zend_blacklist_entry *p = blacklist->entries, *end = blacklist->entries + blacklist->pos; in zend_accel_blacklist_shutdown()
214 free(blacklist->entries); in zend_accel_blacklist_shutdown()
215 blacklist->entries = NULL; in zend_accel_blacklist_shutdown()
216 if (blacklist->regexp_list) { in zend_accel_blacklist_shutdown()
217 zend_regexp_list *temp, *it = blacklist->regexp_list; in zend_accel_blacklist_shutdown()
227 static inline void zend_accel_blacklist_allocate(zend_blacklist *blacklist) in zend_accel_blacklist_allocate() argument
229 if (blacklist->pos == blacklist->size) { in zend_accel_blacklist_allocate()
230 blacklist->size += ZEND_BLACKLIST_BLOCK_SIZE; in zend_accel_blacklist_allocate()
231blacklist->entries = (zend_blacklist_entry *) realloc(blacklist->entries, sizeof(zend_blacklist_en… in zend_accel_blacklist_allocate()
236 static void zend_accel_blacklist_loadone(zend_blacklist *blacklist, char *filename) in zend_accel_blacklist_loadone() argument
238 void zend_accel_blacklist_load(zend_blacklist *blacklist, char *filename) in zend_accel_blacklist_loadone()
302 zend_accel_blacklist_allocate(blacklist); in zend_accel_blacklist_loadone()
303 blacklist->entries[blacklist->pos].path_length = path_length; in zend_accel_blacklist_loadone()
304 blacklist->entries[blacklist->pos].path = (char *)malloc(path_length + 1); in zend_accel_blacklist_loadone()
305 if (!blacklist->entries[blacklist->pos].path) { in zend_accel_blacklist_loadone()
310 blacklist->entries[blacklist->pos].id = blacklist->pos; in zend_accel_blacklist_loadone()
311 memcpy(blacklist->entries[blacklist->pos].path, real_path, path_length + 1); in zend_accel_blacklist_loadone()
312 blacklist->pos++; in zend_accel_blacklist_loadone()
318 zend_accel_blacklist_update_regexp(blacklist); in zend_accel_blacklist_loadone()
322 void zend_accel_blacklist_load(zend_blacklist *blacklist, char *filename) argument
339 zend_accel_blacklist_loadone(blacklist, globbuf.gl_pathv[i]);
346 zend_bool zend_accel_blacklist_is_blacklisted(zend_blacklist *blacklist, char *verify_path, size_t … argument
349 zend_regexp_list *regexp_list_it = blacklist->regexp_list;
373 void zend_accel_blacklist_apply(zend_blacklist *blacklist, blacklist_apply_func_arg_t func, void *a… argument
377 for (i = 0; i < blacklist->pos; i++) {
378 func(&blacklist->entries[i], argument);