mirror of https://github.com/Icinga/icinga2.git
parent
17003d0157
commit
7f0ced592c
|
@ -27,8 +27,8 @@
|
|||
using namespace icinga;
|
||||
namespace po = boost::program_options;
|
||||
|
||||
REGISTER_BLACKANDWHITELIST_CLICOMMAND("whitelist");
|
||||
REGISTER_BLACKANDWHITELIST_CLICOMMAND("blacklist");
|
||||
REGISTER_BLACKANDWHITELIST_CLICOMMAND(whitelist);
|
||||
REGISTER_BLACKANDWHITELIST_CLICOMMAND(blacklist);
|
||||
|
||||
RegisterBlackAndWhitelistCLICommandHelper::RegisterBlackAndWhitelistCLICommandHelper(const String& type)
|
||||
{
|
||||
|
|
|
@ -68,7 +68,7 @@ public:
|
|||
|
||||
#define REGISTER_BLACKANDWHITELIST_CLICOMMAND(type) \
|
||||
namespace { namespace UNIQUE_NAME(blackandwhitelist) { \
|
||||
I2_EXPORT icinga::RegisterBlackAndWhitelistCLICommandHelper l_RegisterBlackAndWhitelistCLICommand(type); \
|
||||
I2_EXPORT icinga::RegisterBlackAndWhitelistCLICommandHelper l_RegisterBlackAndWhitelistCLICommand_ ## type(#type); \
|
||||
} }
|
||||
|
||||
}
|
||||
|
|
|
@ -31,10 +31,10 @@
|
|||
using namespace icinga;
|
||||
namespace po = boost::program_options;
|
||||
|
||||
REGISTER_REPOSITORY_CLICOMMAND("Host");
|
||||
REGISTER_REPOSITORY_CLICOMMAND("Service");
|
||||
REGISTER_REPOSITORY_CLICOMMAND("Zone");
|
||||
REGISTER_REPOSITORY_CLICOMMAND("Endpoint");
|
||||
REGISTER_REPOSITORY_CLICOMMAND(Host);
|
||||
REGISTER_REPOSITORY_CLICOMMAND(Service);
|
||||
REGISTER_REPOSITORY_CLICOMMAND(Zone);
|
||||
REGISTER_REPOSITORY_CLICOMMAND(Endpoint);
|
||||
|
||||
RegisterRepositoryCLICommandHelper::RegisterRepositoryCLICommandHelper(const String& type)
|
||||
{
|
||||
|
|
|
@ -70,7 +70,7 @@ public:
|
|||
|
||||
#define REGISTER_REPOSITORY_CLICOMMAND(type) \
|
||||
namespace { namespace UNIQUE_NAME(repositoryobject) { \
|
||||
I2_EXPORT icinga::RegisterRepositoryCLICommandHelper l_RegisterRepositoryCLICommand(type); \
|
||||
I2_EXPORT icinga::RegisterRepositoryCLICommandHelper l_RegisterRepositoryCLICommand_ ## type(#type); \
|
||||
} }
|
||||
|
||||
}
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#include "base/console.hpp"
|
||||
#include <boost/foreach.hpp>
|
||||
#include <boost/algorithm/string/join.hpp>
|
||||
#include <boost/algorithm/string/replace.hpp>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
|
||||
|
@ -206,7 +207,7 @@ bool RepositoryUtility::WriteObjectToRepository(const String& path, const String
|
|||
fp.close();
|
||||
|
||||
#ifdef _WIN32
|
||||
_unlink(filename.CStr());
|
||||
_unlink(path.CStr());
|
||||
#endif /* _WIN32 */
|
||||
|
||||
if (rename(tempPath.CStr(), path.CStr()) < 0) {
|
||||
|
@ -238,7 +239,7 @@ bool RepositoryUtility::WriteObjectToRepositoryChangeLog(const String& path, con
|
|||
fp.close();
|
||||
|
||||
#ifdef _WIN32
|
||||
_unlink(filename.CStr());
|
||||
_unlink(path.CStr());
|
||||
#endif /* _WIN32 */
|
||||
|
||||
if (rename(tempPath.CStr(), path.CStr()) < 0) {
|
||||
|
|
Loading…
Reference in New Issue