Changeset 2116

Show
Ignore:
Timestamp:
28/03/2008 22:59:28 (9 months ago)
Author:
chris
Message:

Allow configuration of the server port that the client will connect to
(bbackupd and bbackupquery).

Redesign ConfigurationVerify? to use classes instead of structs.

Use port 22011 instead of 2201 during tests, to reduce the chances of
conflicting with a running bbstored or other process.

Ignore autogen_* in svn:ignore everywhere instead of individual per-file
ignores.

Location:
box/trunk
Files:
1 added
32 modified

Legend:

Unmodified
Added
Removed
  • box/trunk

    • Property svn:ignore
      •  

        old new  
        1111release 
        1212runtest.pl 
         13.hg 
  • box/trunk/bin/bbackupd

    • Property svn:ignore
      •  

        old new  
        11Makefile 
        22bbackupd-config 
         3autogen_* 
  • box/trunk/bin/bbackupd/BackupClientContext.cpp

    r2115 r2116  
    4545        TLSContext &rTLSContext,  
    4646        const std::string &rHostname, 
     47        int Port, 
    4748        int32_t AccountNumber,  
    4849        bool ExtendedLogging, 
     
    5354          mrTLSContext(rTLSContext), 
    5455          mHostname(rHostname), 
     56          mPort(Port), 
    5557          mAccountNumber(AccountNumber), 
    5658          mpSocket(0), 
     
    130132 
    131133                // Connect! 
    132                 mpSocket->Open(mrTLSContext, Socket::TypeINET, mHostname.c_str(), BOX_PORT_BBSTORED); 
     134                mpSocket->Open(mrTLSContext, Socket::TypeINET, 
     135                        mHostname.c_str(), mPort); 
    133136                 
    134137                // And create a procotol object 
  • box/trunk/bin/bbackupd/BackupClientContext.h

    r1191 r2116  
    4242                TLSContext &rTLSContext,  
    4343                const std::string &rHostname, 
     44                int32_t Port, 
    4445                int32_t AccountNumber,  
    4546                bool ExtendedLogging, 
     
    202203        TLSContext &mrTLSContext; 
    203204        std::string mHostname; 
     205        int mPort; 
    204206        int32_t mAccountNumber; 
    205207        SocketStreamTLS *mpSocket; 
  • box/trunk/bin/bbackupd/BackupDaemon.cpp

    r2115 r2116  
    959959                                        tlsContext,  
    960960                                        conf.GetKeyValue("StoreHostname"), 
     961                                        conf.GetKeyValueInt("StorePort"), 
    961962                                        conf.GetKeyValueInt("AccountNumber"),  
    962963                                        conf.GetKeyValueBool("ExtendedLogging"), 
  • box/trunk/bin/bbackupquery

    • Property svn:ignore
      •  

        old new  
        1 autogen_Documentation.cpp 
         1autogen_* 
        22Makefile 
        33makedocumentation.pl 
  • box/trunk/bin/bbackupquery/bbackupquery.cpp

    r2115 r2116  
    261261        if(!quiet) BOX_INFO("Connecting to store..."); 
    262262        SocketStreamTLS socket; 
    263         socket.Open(tlsContext, Socket::TypeINET, conf.GetKeyValue("StoreHostname").c_str(), BOX_PORT_BBSTORED); 
     263        socket.Open(tlsContext, Socket::TypeINET, 
     264                conf.GetKeyValue("StoreHostname").c_str(), 
     265                conf.GetKeyValueInt("StorePort")); 
    264266         
    265267        // 3. Make a protocol, and handshake 
  • box/trunk/bin/bbstored

    • Property svn:ignore
      •  

        old new  
        1 autogen_BackupProtocolServer.cpp 
        2 autogen_BackupProtocolServer.h 
         1autogen_* 
        32Makefile 
        43bbstored-certs 
  • box/trunk/infrastructure

    • Property svn:ignore
      •  

        old new  
        22makebuildenv.pl 
        33makeparcels.pl 
         4makedistribution.pl 
  • box/trunk/lib/backupclient

    • Property svn:ignore
      •  

        old new  
        1 autogen_BackupProtocolClient.cpp 
        2 autogen_BackupProtocolClient.h 
        3 autogen_BackupStoreException.cpp 
        4 autogen_BackupStoreException.h 
         1autogen_* 
        52Makefile 
  • box/trunk/lib/backupclient/BackupDaemonConfigVerify.cpp

    r1863 r2116  
    1818static const ConfigurationVerifyKey backuplocationkeys[] =  
    1919{ 
    20         {"ExcludeFile", 0, ConfigTest_MultiValueAllowed, 0}, 
    21         {"ExcludeFilesRegex", 0, ConfigTest_MultiValueAllowed, 0}, 
    22         {"ExcludeDir", 0, ConfigTest_MultiValueAllowed, 0}, 
    23         {"ExcludeDirsRegex", 0, ConfigTest_MultiValueAllowed, 0}, 
    24         {"AlwaysIncludeFile", 0, ConfigTest_MultiValueAllowed, 0}, 
    25         {"AlwaysIncludeFilesRegex", 0, ConfigTest_MultiValueAllowed, 0}, 
    26         {"AlwaysIncludeDir", 0, ConfigTest_MultiValueAllowed, 0}, 
    27         {"AlwaysIncludeDirsRegex", 0, ConfigTest_MultiValueAllowed, 0}, 
    28         {"Path", 0, ConfigTest_Exists | ConfigTest_LastEntry, 0} 
     20        ConfigurationVerifyKey("ExcludeFile", ConfigTest_MultiValueAllowed), 
     21        ConfigurationVerifyKey("ExcludeFilesRegex", ConfigTest_MultiValueAllowed), 
     22        ConfigurationVerifyKey("ExcludeDir", ConfigTest_MultiValueAllowed), 
     23        ConfigurationVerifyKey("ExcludeDirsRegex", ConfigTest_MultiValueAllowed), 
     24        ConfigurationVerifyKey("AlwaysIncludeFile", ConfigTest_MultiValueAllowed), 
     25        ConfigurationVerifyKey("AlwaysIncludeFilesRegex", ConfigTest_MultiValueAllowed), 
     26        ConfigurationVerifyKey("AlwaysIncludeDir", ConfigTest_MultiValueAllowed), 
     27        ConfigurationVerifyKey("AlwaysIncludeDirsRegex", ConfigTest_MultiValueAllowed), 
     28        ConfigurationVerifyKey("Path", ConfigTest_Exists | ConfigTest_LastEntry) 
    2929}; 
    3030 
     
    6565static const ConfigurationVerifyKey verifyrootkeys[] =  
    6666{ 
    67         {"AccountNumber", 0, ConfigTest_Exists | ConfigTest_IsInt, 0}, 
     67        ConfigurationVerifyKey("AccountNumber", 
     68                ConfigTest_Exists | ConfigTest_IsInt), 
     69        ConfigurationVerifyKey("UpdateStoreInterval", 
     70                ConfigTest_Exists | ConfigTest_IsInt), 
     71        ConfigurationVerifyKey("MinimumFileAge", 
     72                ConfigTest_Exists | ConfigTest_IsInt), 
     73        ConfigurationVerifyKey("MaxUploadWait", 
     74                ConfigTest_Exists | ConfigTest_IsInt), 
     75        ConfigurationVerifyKey("MaxFileTimeInFuture", ConfigTest_IsInt, 172800), 
     76        // file is uploaded if the file is this much in the future 
     77        // (2 days default) 
     78        ConfigurationVerifyKey("AutomaticBackup", ConfigTest_IsBool, true), 
     79         
     80        ConfigurationVerifyKey("SyncAllowScript", 0), 
     81        // script that returns "now" if backup is allowed now, or a number 
     82        // of seconds to wait before trying again if not 
    6883 
    69         {"UpdateStoreInterval", 0, ConfigTest_Exists | ConfigTest_IsInt, 0}, 
    70         {"MinimumFileAge", 0, ConfigTest_Exists | ConfigTest_IsInt, 0}, 
    71         {"MaxUploadWait", 0, ConfigTest_Exists | ConfigTest_IsInt, 0}, 
    72         {"MaxFileTimeInFuture", "172800", ConfigTest_IsInt, 0},         // file is uploaded if the file is this much in the future (2 days default) 
     84        ConfigurationVerifyKey("MaximumDiffingTime", ConfigTest_IsInt), 
     85        ConfigurationVerifyKey("DeleteRedundantLocationsAfter", 
     86                ConfigTest_IsInt, 172800), 
    7387 
    74         {"AutomaticBackup", "yes", ConfigTest_IsBool, 0}, 
     88        ConfigurationVerifyKey("FileTrackingSizeThreshold",  
     89                ConfigTest_Exists | ConfigTest_IsInt), 
     90        ConfigurationVerifyKey("DiffingUploadSizeThreshold", 
     91                ConfigTest_Exists | ConfigTest_IsInt), 
     92        ConfigurationVerifyKey("StoreHostname", ConfigTest_Exists), 
     93        ConfigurationVerifyKey("StorePort", ConfigTest_IsInt, 
     94                BOX_PORT_BBSTORED), 
     95        ConfigurationVerifyKey("ExtendedLogging", ConfigTest_IsBool, false), 
     96        // extended log to syslog 
     97        ConfigurationVerifyKey("ExtendedLogFile", 0), 
     98        // extended log to a file 
     99        ConfigurationVerifyKey("LogAllFileAccess", ConfigTest_IsBool, false), 
     100        ConfigurationVerifyKey("CommandSocket", 0), 
     101        // not compulsory to have this 
     102        ConfigurationVerifyKey("KeepAliveTime", ConfigTest_IsInt), 
     103        ConfigurationVerifyKey("StoreObjectInfoFile", 0), 
     104        // optional 
     105 
     106        ConfigurationVerifyKey("NotifyScript", 0), 
     107        // optional script to run when backup needs attention, eg store full 
    75108         
    76         {"SyncAllowScript", 0, 0, 0},                   // optional script to run to see if the sync should be started now 
    77                                 // return "now" if it's allowed, or a number of seconds if it's not 
    78  
    79         {"MaximumDiffingTime", 0, ConfigTest_IsInt, 0}, 
    80         {"DeleteRedundantLocationsAfter", "172800", ConfigTest_IsInt, 0}, 
    81  
    82         {"FileTrackingSizeThreshold", 0, ConfigTest_Exists | ConfigTest_IsInt, 0}, 
    83         {"DiffingUploadSizeThreshold", 0, ConfigTest_Exists | ConfigTest_IsInt, 0}, 
    84         {"StoreHostname", 0, ConfigTest_Exists, 0}, 
    85         {"ExtendedLogging",     "no", ConfigTest_IsBool, 0}, // extended log to syslog 
    86         {"ExtendedLogFile",     NULL, 0, 0}, // extended log to a file 
    87         {"LogAllFileAccess", "no", ConfigTest_IsBool, 0}, 
    88  
    89         {"CommandSocket", 0, 0, 0},                             // not compulsory to have this 
    90         {"KeepAliveTime", 0, ConfigTest_IsInt, 0},                              // optional 
    91         {"StoreObjectInfoFile", 0, 0, 0},                               // optional 
    92  
    93         {"NotifyScript", 0, 0, 0},                              // optional script to run when backup needs attention, eg store full 
    94          
    95         {"CertificateFile", 0, ConfigTest_Exists, 0}, 
    96         {"PrivateKeyFile", 0, ConfigTest_Exists, 0}, 
    97         {"TrustedCAsFile", 0, ConfigTest_Exists, 0}, 
    98         {"KeysFile", 0, ConfigTest_Exists, 0}, 
    99         {"DataDirectory", 0, ConfigTest_Exists | ConfigTest_LastEntry, 0} 
     109        ConfigurationVerifyKey("CertificateFile", ConfigTest_Exists), 
     110        ConfigurationVerifyKey("PrivateKeyFile", ConfigTest_Exists), 
     111        ConfigurationVerifyKey("TrustedCAsFile", ConfigTest_Exists), 
     112        ConfigurationVerifyKey("KeysFile", ConfigTest_Exists), 
     113        ConfigurationVerifyKey("DataDirectory",  
     114                ConfigTest_Exists | ConfigTest_LastEntry), 
    100115}; 
    101116 
  • box/trunk/lib/backupstore/BackupStoreConfigVerify.cpp

    r1777 r2116  
    1717static const ConfigurationVerifyKey verifyserverkeys[] =  
    1818{ 
    19         SERVERTLS_VERIFY_SERVER_KEYS(0) // no default listen addresses 
     19        SERVERTLS_VERIFY_SERVER_KEYS(ConfigurationVerifyKey::NoDefaultValue) 
     20        // no default listen addresses 
    2021}; 
    2122 
     
    3334static const ConfigurationVerifyKey verifyrootkeys[] =  
    3435{ 
    35         {"AccountDatabase",     0, ConfigTest_Exists, 0}, 
    36         {"TimeBetweenHousekeeping",     0, ConfigTest_Exists | ConfigTest_IsInt, 0}, 
    37         {"ExtendedLogging",     "no", ConfigTest_IsBool, 0},                    // make value "yes" to enable in config file 
     36        ConfigurationVerifyKey("AccountDatabase", ConfigTest_Exists), 
     37        ConfigurationVerifyKey("TimeBetweenHousekeeping", 
     38                ConfigTest_Exists | ConfigTest_IsInt), 
     39        ConfigurationVerifyKey("ExtendedLogging", ConfigTest_IsBool, false), 
     40        // make value "yes" to enable in config file 
    3841 
    3942        #ifdef WIN32 
    40                 {"RaidFileConf", "", ConfigTest_LastEntry, 0} 
     43                ConfigurationVerifyKey("RaidFileConf", ConfigTest_LastEntry) 
    4144        #else 
    42                 {"RaidFileConf", BOX_FILE_RAIDFILE_DEFAULT_CONFIG, ConfigTest_LastEntry, 0} 
     45                ConfigurationVerifyKey("RaidFileConf", ConfigTest_LastEntry, 
     46                        BOX_FILE_RAIDFILE_DEFAULT_CONFIG) 
    4347        #endif 
    44  
    4548}; 
    4649 
  • box/trunk/lib/common

    • Property svn:ignore
      •  

        old new  
        1 autogen_CommonException.cpp 
        2 autogen_CommonException.h 
        3 autogen_ConversionException.cpp 
        4 autogen_ConversionException.h 
         1autogen_* 
        52BoxConfig.h 
        63BoxConfig.h.in 
        74Makefile 
        85makeexception.pl 
         6BoxPortsAndFiles.h 
  • box/trunk/lib/common/Configuration.cpp

    r1865 r2116  
    1212#include <stdlib.h> 
    1313#include <limits.h> 
     14 
     15#include <sstream> 
    1416 
    1517#include "Configuration.h" 
     
    3032static const bool sValueBooleanValue[] = {true, true, false, false}; 
    3133 
    32  
     34ConfigurationVerifyKey::ConfigurationVerifyKey 
     35( 
     36        std::string name, 
     37        int flags, 
     38        void *testFunction 
     39) 
     40: mName(name), 
     41  mHasDefaultValue(false), 
     42  mFlags(flags), 
     43  mTestFunction(testFunction) 
     44{ } 
     45 
     46// to allow passing NULL for default ListenAddresses 
     47 
     48ConfigurationVerifyKey::ConfigurationVerifyKey 
     49( 
     50        std::string name, 
     51        int flags, 
     52        NoDefaultValue_t t, 
     53        void *testFunction 
     54) 
     55: mName(name), 
     56  mHasDefaultValue(false), 
     57  mFlags(flags), 
     58  mTestFunction(testFunction) 
     59{ } 
     60 
     61ConfigurationVerifyKey::ConfigurationVerifyKey 
     62( 
     63        std::string name, 
     64        int flags, 
     65        std::string defaultValue, 
     66        void *testFunction 
     67) 
     68: mName(name), 
     69  mDefaultValue(defaultValue), 
     70  mHasDefaultValue(true), 
     71  mFlags(flags), 
     72  mTestFunction(testFunction) 
     73{ } 
     74 
     75ConfigurationVerifyKey::ConfigurationVerifyKey 
     76( 
     77        std::string name, 
     78        int flags, 
     79        const char *defaultValue, 
     80        void *testFunction 
     81) 
     82: mName(name), 
     83  mDefaultValue(defaultValue), 
     84  mHasDefaultValue(true), 
     85  mFlags(flags), 
     86  mTestFunction(testFunction) 
     87{ } 
     88 
     89ConfigurationVerifyKey::ConfigurationVerifyKey 
     90( 
     91        std::string name, 
     92        int flags, 
     93        int defaultValue, 
     94        void *testFunction 
     95) 
     96: mName(name), 
     97  mHasDefaultValue(true), 
     98  mFlags(flags), 
     99  mTestFunction(testFunction) 
     100{ 
     101        ASSERT(flags & ConfigTest_IsInt); 
     102        std::ostringstream val; 
     103        val << defaultValue; 
     104        mDefaultValue = val.str(); 
     105} 
     106 
     107ConfigurationVerifyKey::ConfigurationVerifyKey 
     108( 
     109        std::string name, 
     110        int flags, 
     111        bool defaultValue, 
     112        void *testFunction 
     113) 
     114: mName(name), 
     115  mHasDefaultValue(true), 
     116  mFlags(flags), 
     117  mTestFunction(testFunction) 
     118{ 
     119        ASSERT(flags & ConfigTest_IsBool); 
     120        mDefaultValue = defaultValue ? "yes" : "no"; 
     121} 
     122 
     123ConfigurationVerifyKey::ConfigurationVerifyKey 
     124( 
     125        const ConfigurationVerifyKey& rToCopy 
     126) 
     127: mName(rToCopy.mName), 
     128  mDefaultValue(rToCopy.mDefaultValue), 
     129  mHasDefaultValue(rToCopy.mHasDefaultValue), 
     130  mFlags(rToCopy.mFlags), 
     131  mTestFunction(rToCopy.mTestFunction) 
     132{ } 
    33133 
    34134// -------------------------------------------------------------------------- 
     
    121221                        if(!Verify(*pconfig, *pVerify, std::string(), rErrorMsg)) 
    122222                        { 
    123                                 //TRACE1("Error message from Verify: %s", rErrorMsg.c_str()); 
    124                                 TRACE0("Error at Configuration::Verify\n"); 
     223                                BOX_ERROR("Error verifying configuration: " << 
     224                                        rErrorMsg); 
    125225                                delete pconfig; 
    126226                                pconfig = 0; 
     
    190290                        else 
    191291                        { 
    192                                 rErrorMsg += "Unexpected start block in " + rConfig.mName + "\n"; 
     292                                rErrorMsg += "Unexpected start block in " + 
     293                                        rConfig.mName + "\n"; 
    193294                        } 
    194295                } 
     
    291392// 
    292393// Function 
    293 //              Name:    Configuration::KeyExists(const char *) 
     394//              Name:    Configuration::KeyExists(const std::string&) 
    294395//              Purpose: Checks to see if a key exists 
    295396//              Created: 2003/07/23 
    296397// 
    297398// -------------------------------------------------------------------------- 
    298 bool Configuration::KeyExists(const char *pKeyName) const 
    299 { 
    300         if(pKeyName == 0) {THROW_EXCEPTION(CommonException, BadArguments)} 
    301  
    302         return mKeys.find(pKeyName) != mKeys.end(); 
    303 } 
    304  
    305  
    306 // -------------------------------------------------------------------------- 
    307 // 
    308 // Function 
    309 //              Name:    Configuration::GetKeyValue(const char *) 
     399bool Configuration::KeyExists(const std::string& rKeyName) const 
     400{ 
     401        return mKeys.find(rKeyName) != mKeys.end(); 
     402} 
     403 
     404 
     405// -------------------------------------------------------------------------- 
     406// 
     407// Function 
     408//              Name:    Configuration::GetKeyValue(const std::string&) 
    310409//              Purpose: Returns the value of a configuration variable 
    311410//              Created: 2003/07/23 
    312411// 
    313412// -------------------------------------------------------------------------- 
    314 const std::string &Configuration::GetKeyValue(const char *pKeyName) const 
    315 { 
    316         if(pKeyName == 0) {THROW_EXCEPTION(CommonException, BadArguments)} 
    317  
    318         std::map<std::string, std::string>::const_iterator i(mKeys.find(pKeyName)); 
     413const std::string &Configuration::GetKeyValue(const std::string& rKeyName) const 
     414{ 
     415        std::map<std::string, std::string>::const_iterator i(mKeys.find(rKeyName)); 
    319416         
    320417        if(i == mKeys.end()) 
    321418        { 
    322                 BOX_ERROR("Missing configuration key: " << pKeyName); 
     419                BOX_ERROR("Missing configuration key: " << rKeyName); 
    323420                THROW_EXCEPTION(CommonException, ConfigNoKey) 
    324421        } 
     
    333430// 
    334431// Function 
    335 //              Name:    Configuration::GetKeyValueInt(const char *) 
     432//              Name:    Configuration::GetKeyValueInt(const std::string& rKeyName) 
    336433//              Purpose: Gets a key value as an integer 
    337434//              Created: 2003/07/23 
    338435// 
    339436// -------------------------------------------------------------------------- 
    340 int Configuration::GetKeyValueInt(const char *pKeyName) const 
    341 { 
    342         if(pKeyName == 0) {THROW_EXCEPTION(CommonException, BadArguments)} 
    343  
    344         std::map<std::string, std::string>::const_iterator i(mKeys.find(pKeyName)); 
     437int Configuration::GetKeyValueInt(const std::string& rKeyName) const 
     438{ 
     439        std::map<std::string, std::string>::const_iterator i(mKeys.find(rKeyName)); 
    345440         
    346441        if(i == mKeys.end()) 
     
    363458// 
    364459// Function 
    365 //              Name:    Configuration::GetKeyValueBool(const char *) const 
     460//              Name:    Configuration::GetKeyValueBool(const std::string&) 
    366461//              Purpose: Gets a key value as a boolean 
    367462//              Created: 17/2/04 
    368463// 
    369464// -------------------------------------------------------------------------- 
    370 bool Configuration::GetKeyValueBool(const char *pKeyName) const 
    371 { 
    372         if(pKeyName == 0) {THROW_EXCEPTION(CommonException, BadArguments)} 
    373  
    374         std::map<std::string, std::string>::const_iterator i(mKeys.find(pKeyName)); 
     465bool Configuration::GetKeyValueBool(const std::string& rKeyName) const 
     466{ 
     467        std::map<std::string, std::string>::const_iterator i(mKeys.find(rKeyName)); 
    375468         
    376469        if(i == mKeys.end()) 
     
    429522// 
    430523// Function 
    431 //              Name:    Configuration::SubConfigurationExists(const char *) 
     524//              Name:    Configuration::SubConfigurationExists(const 
     525//                       std::string&) 
    432526//              Purpose: Checks to see if a sub configuration exists 
    433527//              Created: 2003/07/23 
    434528// 
    435529// -------------------------------------------------------------------------- 
    436 bool Configuration::SubConfigurationExists(const char *pSubName) const 
    437 { 
    438         if(pSubName == 0) {THROW_EXCEPTION(CommonException, BadArguments)} 
    439  
     530bool Configuration::SubConfigurationExists(const std::string& rSubName) const 
     531{ 
    440532        // Attempt to find it... 
    441533        std::list<std::pair<std::string, Configuration> >::const_iterator i(mSubConfigurations.begin()); 
     
    444536        { 
    445537                // This the one? 
    446                 if(i->first == pSubName) 
     538                if(i->first == rSubName) 
    447539                { 
    448540                        // Yes. 
     
    459551// 
    460552// Function 
    461 //              Name:    Configuration::GetSubConfiguration(const char *) 
     553//              Name:    Configuration::GetSubConfiguration(const 
     554//                       std::string&) 
    462555//              Purpose: Gets a sub configuration 
    463556//              Created: 2003/07/23 
    464557// 
    465558// -------------------------------------------------------------------------- 
    466 const Configuration &Configuration::GetSubConfiguration(const char *pSubName) const 
    467 { 
    468         if(pSubName == 0) {THROW_EXCEPTION(CommonException, BadArguments)} 
    469  
     559const Configuration &Configuration::GetSubConfiguration(const std::string& 
     560        rSubName) const 
     561{ 
    470562        // Attempt to find it... 
    471563        std::list<std::pair<std::string, Configuration> >::const_iterator i(mSubConfigurations.begin()); 
     
    474566        { 
    475567                // This the one? 
    476                 if(i->first == pSubName) 
     568                if(i->first == rSubName) 
    477569                { 
    478570                        // Yes. 
     
    529621                { 
    530622                        // Can the key be found? 
    531                         ASSERT(pvkey->mpName); 
    532                         if(rConfig.KeyExists(pvkey->mpName)) 
     623                        if(rConfig.KeyExists(pvkey->Name())) 
    533624                        { 
    534625                                // Get value 
    535                                 const std::string &rval = rConfig.GetKeyValue(pvkey->mpName); 
     626                                const std::string &rval = rConfig.GetKeyValue(pvkey->Name()); 
    536627                                const char *val = rval.c_str(); 
    537628 
    538629                                // Check it's a number? 
    539                                 if((pvkey->Tests & ConfigTest_IsInt) == ConfigTest_IsInt) 
     630                                if((pvkey->Flags() & ConfigTest_IsInt) == ConfigTest_IsInt)