filter: add function filter_reload()

This commit is contained in:
Michael Adam 2009-10-25 13:54:46 +01:00
parent 79527fb6f7
commit 83987babd3
2 changed files with 13 additions and 0 deletions

View File

@ -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 */
int filter_domain (const char *host)
{

View File

@ -28,6 +28,7 @@ typedef enum {
extern void filter_init (void);
extern void filter_destroy (void);
extern void filter_reload (void);
extern int filter_domain (const char *host);
extern int filter_url (const char *url);