Update of /cvsroot/vpopmail/vpopmail
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13407
Modified Files:
vpopmail.c vpopmaild.c
Log Message:
Vpopmaild clears vget_assign cache after del_domain to prevent buglet mentioned on vpopmail-dev list.
Index: vpopmaild.c
===================================================================
RCS file: /cvsroot/vpopmail/vpopmail/vpopmaild.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- vpopmaild.c 22 May 2004 12:28:21 -0000 1.13
+++ vpopmaild.c 3 Jun 2004 23:54:00 -0000 1.14
@@ -909,6 +909,7 @@
int del_domain()
{
char *domain;
+ char *dummy="";
int ret;
if ( !(AuthVpw.pw_gid & SA_ADMIN) ) {
@@ -926,6 +927,9 @@
return(-1);
}
+ /* Clear the domain info cache */
+ vget_assign(dummy, NULL, 0, NULL, NULL );
+
snprintf(WriteBuf,sizeof(WriteBuf), RET_OK);
return(0);
}
Index: vpopmail.c
===================================================================
RCS file: /cvsroot/vpopmail/vpopmail/vpopmail.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -d -r1.42 -r1.43
--- vpopmail.c 27 May 2004 00:53:01 -0000 1.42
+++ vpopmail.c 3 Jun 2004 23:54:00 -0000 1.43
@@ -2497,7 +2497,6 @@
int vexiterror( FILE *f, char *comment )
{
-
fprintf( f, "Error - %s. %s\n", verror( verrori ), comment );
if( NULL != sqlerr && strlen(sqlerr) > 0 ) {
@@ -2620,8 +2619,11 @@
char cdb_file[MAX_BUFF];
char *cdb_buf;
- /* cant lookup a null domain! */
- if ( domain == NULL || *domain == 0) return(NULL);
+ /* cant lookup a null domain! -- but it does clear the cache */
+ if ( domain == NULL || *domain == 0) {
+ in_domain = NULL;
+ return(NULL);
+ }
/* if domain matches last lookup, use cached values */
lowerit(domain);
|