Skip to content

Commit

Permalink
Merge pull request #1 from aschnell/master
Browse files Browse the repository at this point in the history
- don't use snapper factory
  • Loading branch information
jsuchome committed Aug 30, 2012
2 parents 1e35847 + e822b56 commit 30935b4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
11 changes: 7 additions & 4 deletions agent-snapper/src/SnapperAgent.cc
Expand Up @@ -99,7 +99,8 @@ SnapperAgent::~SnapperAgent()
{
if (sh)
{
deleteSnapper(sh);
delete sh;
sh = 0;
}
}

Expand Down Expand Up @@ -344,11 +345,13 @@ YCPValue SnapperAgent::Execute(const YCPPath &path, const YCPValue& arg,
if (sh)
{
y2milestone ("deleting existing snapper object");
deleteSnapper(sh);
delete sh;
sh = 0;
}
string config_name = getValue (argmap, YCPString ("config"), "root");
try {
sh = createSnapper (config_name);
try
{
sh = new Snapper(config_name);
}
catch (const ConfigNotFoundException& e)
{
Expand Down
1 change: 0 additions & 1 deletion agent-snapper/src/SnapperAgent.h
Expand Up @@ -14,7 +14,6 @@
#include <scr/SCRAgent.h>

#include <snapper/Snapper.h>
#include <snapper/Factory.h>
#include <snapper/Snapshot.h>
#include <snapper/Comparison.h>
#include <snapper/File.h>
Expand Down

0 comments on commit 30935b4

Please sign in to comment.