filter: add function filter_reload()
This commit is contained in:
parent
79527fb6f7
commit
83987babd3
12
src/filter.c
12
src/filter.c
@ -150,6 +150,18 @@ void filter_destroy (void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* reload the filter file if filtering is enabled
|
||||||
|
*/
|
||||||
|
void filter_reload (void)
|
||||||
|
{
|
||||||
|
if (config.filter) {
|
||||||
|
log_message (LOG_NOTICE, "Re-reading filter file.");
|
||||||
|
filter_destroy ();
|
||||||
|
filter_init ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Return 0 to allow, non-zero to block */
|
/* Return 0 to allow, non-zero to block */
|
||||||
int filter_domain (const char *host)
|
int filter_domain (const char *host)
|
||||||
{
|
{
|
||||||
|
@ -28,6 +28,7 @@ typedef enum {
|
|||||||
|
|
||||||
extern void filter_init (void);
|
extern void filter_init (void);
|
||||||
extern void filter_destroy (void);
|
extern void filter_destroy (void);
|
||||||
|
extern void filter_reload (void);
|
||||||
extern int filter_domain (const char *host);
|
extern int filter_domain (const char *host);
|
||||||
extern int filter_url (const char *url);
|
extern int filter_url (const char *url);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user