X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fsrc%2Fdbstuff.h;h=93c715ac2f27f33568870f57875777c43500c600;hb=f10e2052dc60814e241eda952149459674906cdf;hp=6ffad081cde53b3a5603eda99425a8ec7055e89a;hpb=9ad41a429ba06b5c0aff0793e25daa8e7d8909e2;p=user%2Fhenk%2Fcode%2Fexim.git diff --git a/src/src/dbstuff.h b/src/src/dbstuff.h index 6ffad081c..93c715ac2 100644 --- a/src/src/dbstuff.h +++ b/src/src/dbstuff.h @@ -1,10 +1,8 @@ -/* $Cambridge: exim/src/src/dbstuff.h,v 1.8 2009/10/16 08:40:53 tom Exp $ */ - /************************************************* * Exim - an Internet mail transport agent * *************************************************/ -/* Copyright (c) University of Cambridge 1995 - 2007 */ +/* Copyright (c) University of Cambridge 1995 - 2009 */ /* See the file NOTICE for conditions of use and distribution. */ /* This header file contains macro definitions so that a variety of DBM @@ -66,7 +64,7 @@ tdb_traverse to be called) */ /* EXIM_DBCREATE_CURSOR - initialize for scanning operation */ #define EXIM_DBCREATE_CURSOR(db, cursor) { \ - *(cursor) = malloc(sizeof(TDB_DATA)); (*(cursor))->dptr = NULL; } + *(cursor) = store_malloc(sizeof(TDB_DATA)); (*(cursor))->dptr = NULL; } /* EXIM_DBSCAN - This is complicated because we have to free the last datum free() must not die when passed NULL */ @@ -654,5 +652,14 @@ typedef struct { double rate; /* Smoothed sending rate at that time */ } dbdata_ratelimit; +/* Same as above, plus a Bloom filter for uniquifying events. */ + +typedef struct { + dbdata_ratelimit dbd; + time_t bloom_epoch; /* When the Bloom filter was last reset */ + unsigned bloom_size; /* Number of bytes in the Bloom filter */ + uschar bloom[40]; /* Bloom filter which may be larger than this */ +} dbdata_ratelimit_unique; + /* End of dbstuff.h */