In working with a clean install of vpopmail using my bigdir-backfill patch
posted a few weeks ago, I found a problem - if there's no vpopmail table
to do lookups in vadddomain fails with an SQL error. The attached patch
fixes that - it checks to see if vdir->cur_users == 1, and if so just sets
user_count = 1 rather than doing the lookup. I guess you could do this
for if cur_users < dir_limit, but you really only want to do this if
there's no table to avoid the SQL error...
Josh
--
Joshua Megerman
SJGames MIB #5273 - OGRE AI Testing Division
You can't win; You can't break even; You can't even quit the game.
- Layman's translation of the Laws of Thermodynamics
[EMAIL PROTECTED]
diff -urN ../04-TCD/vpopmail-5.4.13/bigdir.c vpopmail-5.4.13/bigdir.c
--- ../04-TCD/vpopmail-5.4.13/bigdir.c 2006-01-05 14:08:19.000000000 -0500
+++ vpopmail-5.4.13/bigdir.c 2006-01-25 15:02:36.000000000 -0500
@@ -111,7 +111,11 @@
for(i=vdir->level_cur+1;i<vdir->level_max;i++)
vdir->level_index[i] = 0;
}
- rc = vcount_dir_users(&user_count, domain, vdir->the_dir);
+ if (vdir->cur_users == 1) {
+ user_count = 1;
+ } else {
+ rc = vcount_dir_users(&user_count, domain, vdir->the_dir);
+ }
while ( user_count >= vdir->dir_limit ) {
if ( vdir->level_index[vdir->level_cur] ==
vdir->level_end[vdir->level_cur] ) {