Changeset 14406

Show
Ignore:
Timestamp:
03.09.2007 16:09:48 (12 years ago)
Author:
qq6
Message:

fixed a bug of defining userdbclass and keydbclass

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • gsdl/tags/gsdl-2_74-distribution/src/w32server/cgiwrapper.cpp

    r14389 r14406  
    356356htmlbrowserclass *ahtmlbrowserclass = NULL; 
    357357phindbrowserclass *aphindbrowserclass = NULL; 
     358text_t userdbfile = NULL; 
     359userdbclass *udb = NULL; 
     360text_t keydbfile = NULL; 
     361keydbclass *kdb = NULL; 
    358362 
    359363// returns 1 if successful, 0 if unsuccessful (note that as well as being 
     
    491495  nproto.set_collectset(cservers); 
    492496   
    493   text_t userdbfile = filename_cat(gsdl_gsdlhome, "etc", "users.db"); 
    494   userdbclass *udb = new userdbclass(userdbfile); 
    495  
    496   text_t keydbfile = filename_cat(gsdl_gsdlhome, "etc", "key.db"); 
    497   keydbclass *kdb = new keydbclass(keydbfile); 
    498  
     497  if ((ausersaction == NULL) && (aauthenaction == NULL)){ 
     498    userdbfile = filename_cat(gsdl_gsdlhome, "etc", "users.db"); 
     499    udb = new userdbclass(userdbfile); 
     500    keydbfile = filename_cat(gsdl_gsdlhome, "etc", "key.db"); 
     501    kdb = new keydbclass(keydbfile); 
     502  } 
    499503  // add the protocol to the receptionist 
    500504  if (atStartup) recpt.add_protocol (&nproto);