changeset 105:1a54e1702ea2 noffle

[svn] Use new Cfg_expire(grp)
author bears
date Tue, 13 Jun 2000 07:36:26 +0100
parents 402300614185
children 46062d2f9d20
files src/database.c
diffstat 1 files changed, 6 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/src/database.c	Tue Jun 13 07:34:25 2000 +0100
+++ b/src/database.c	Tue Jun 13 07:36:26 2000 +0100
@@ -1,7 +1,7 @@
 /*
   database.c
 
-  $Id: database.c 113 2000-05-19 15:15:45Z bears $
+  $Id: database.c 144 2000-06-13 06:36:26Z bears $
 
   Uses GNU gdbm library. Using Berkeley db (included in libc6) was
   cumbersome. It is based on Berkeley db 1.85, which has severe bugs
@@ -27,7 +27,6 @@
 #include "log.h"
 #include "protocol.h"
 #include "util.h"
-#include "wildmat.h"
 #include "portable.h"
 
 static struct Db
@@ -585,26 +584,16 @@
     refs = new_Itl( xref, " :" );
     for ( ref = Itl_first( refs ); ref != NULL; ref = Itl_next( refs ) )
     {
-	Str pattern;
 	int days;
-	
-	Cfg_beginExpireEnum();
-	while ( ( days = Cfg_nextExpire( pattern ) ) != -1 )
-	    if ( Wld_match( ref, pattern )
-		 && ( ( days > res && res != 0 ) ||
-		      days == 0 ) )
-	    {
-		res = days;
-		Log_dbg ( "Custom expiry %d for %s in group %s",
-			  days, msgId, ref );
-		break;
-	    }
+
+	days = Cfg_expire( ref );
+	if ( days == 0
+	     || ( days > res && res != 0 ) )
+	    res = days;
 	
 	Itl_next( refs );	/* Throw away group number */
     }
 
-    if ( res == -1 )
-	res = Cfg_expire();
     return res;
 }