Browse Source

Save rulebase only if credentials were specified on the command line.


git-svn-id: https://svn.microneil.com/svn/SNFUtility/trunk@9 aa37657e-1934-4a5f-aa6d-2d8eab27ff7c
master
adeniz 12 years ago
parent
commit
fa2341d366
2 changed files with 16 additions and 11 deletions
  1. 10
    10
      Common/UtilityConfig.hpp
  2. 6
    1
      SNFMilterConfig/SNFMilterConfig.cpp

+ 10
- 10
Common/UtilityConfig.hpp View File

// owner. // owner.
void UpdateLogDir(); void UpdateLogDir();
/// Determine whether the credentials should be updated.
//
// This method determines whether the credentials should be
// updated. If the user specified both the License ID and
// Authentication, then the credentials should be updated.
//
// \returns true if the credentials should be updated.
//
bool UpdateCredentialsSpecified();
/// Create or update the rulebase script. /// Create or update the rulebase script.
// //
// If the rulebase script doesn't exist, this method creates the // If the rulebase script doesn't exist, this method creates the
private: private:
/// Determine whether the credentials should be updated.
//
// This method determines whether the credentials should be
// updated. If the user specified both the License ID and
// Authentication, then the credentials should be updated.
//
// \returns true if the credentials should be updated.
//
bool UpdateCredentialsSpecified();
/// Update the credentials of an existing rulebase script. /// Update the credentials of an existing rulebase script.
// //
// This method does the actual work of updating the credentials of // This method does the actual work of updating the credentials of

+ 6
- 1
SNFMilterConfig/SNFMilterConfig.cpp View File

if (!Explain()) { if (!Explain()) {
SaveFile.CreateBackupFile(GetRulebaseScriptName()); SaveFile.CreateBackupFile(GetRulebaseScriptName());
SaveFile.CreateBackupFile(GetRulebaseFileName());
if (UpdateCredentialsSpecified()) {
SaveFile.CreateBackupFile(GetRulebaseFileName());
}
SaveFile.CreateBackupFile(GetIdentityFileName()); SaveFile.CreateBackupFile(GetIdentityFileName());
SaveFile.CreateBackupFile(GetIgnoreListFileName()); SaveFile.CreateBackupFile(GetIgnoreListFileName());

Loading…
Cancel
Save