From 6f972aaf18542b3f9a85b2b1e3b4ff1dd39f0032 Mon Sep 17 00:00:00 2001 From: dcp1990 Date: Sun, 12 Jun 2005 22:01:09 +0000 Subject: [PATCH] Add field for pcresize, since it changes (we use pcre_fullinfo to get it during copy_condition()) --- include/phoned.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/include/phoned.h b/include/phoned.h index c68e3b2..15f4959 100644 --- a/include/phoned.h +++ b/include/phoned.h @@ -3,7 +3,7 @@ * (C)2005, Dan Ponte * BSDL w/ advert. */ -/* $Amigan: phoned/include/phoned.h,v 1.6 2005/06/12 18:51:06 dcp1990 Exp $ */ +/* $Amigan: phoned/include/phoned.h,v 1.7 2005/06/12 22:01:09 dcp1990 Exp $ */ #include /* fugly, I know... */ #define VERSION "0.1" #define LOGFILE "/var/log/phoned.log" @@ -82,13 +82,14 @@ typedef struct rx_t { pcre* prex; const char* error; int erroroffset; -} regex_t; + int pcresize; +} rex_t; typedef struct cnd_t { char* filtername; char* name; char* number; - regex_t namerx; - regex_t numbrx; + rex_t namerx; + rex_t numbrx; int action; struct af actflags; int flags; @@ -124,5 +125,7 @@ void flush_lists(void); void addtoaddrs(const char* par); void modem_hread(char* cbuf); void cid_log(cid_t* c); -cond_t* add_condition(char* filtname, char* nameregex, char* numregex, int action); +cond_t* add_condition(char* filtname, char* nameregex, char* numregex, int action, int flags); void free_condition(cond_t* h, short traverse); +cond_t* copy_condition(cond_t* con); +void check_condition(cid_t* cid);