xref: /minix/libexec/ftpd/pfilter.c (revision 0a6a1f1d)
1 #include <stdio.h>
2 #include <blacklist.h>
3 
4 #include "pfilter.h"
5 
6 static struct blacklist *blstate;
7 
8 void
pfilter_open(void)9 pfilter_open(void)
10 {
11 	if (blstate == NULL)
12 		blstate = blacklist_open();
13 }
14 
15 void
pfilter_notify(int what,const char * msg)16 pfilter_notify(int what, const char *msg)
17 {
18 	pfilter_open();
19 
20 	if (blstate == NULL)
21 		return;
22 
23 	blacklist_r(blstate, what, 0, msg);
24 }
25