diff options
author | Christian Pointner <equinox@anytun.org> | 2009-04-07 01:29:46 +0000 |
---|---|---|
committer | Christian Pointner <equinox@anytun.org> | 2009-04-07 01:29:46 +0000 |
commit | 2d321c8ca41e26456bb96c4c6b5612a44b408ff4 (patch) | |
tree | 70a4047606c633b75f48977ea29e6a1f2f541761 | |
parent | removed anytun02-compat mode (diff) |
added log notice for key derivation role parameter
-rw-r--r-- | src/keyDerivation.cpp | 1 | ||||
-rw-r--r-- | src/options.cpp | 10 | ||||
-rw-r--r-- | src/options.h | 1 |
3 files changed, 12 insertions, 0 deletions
diff --git a/src/keyDerivation.cpp b/src/keyDerivation.cpp index 72a7fa4..cdf6368 100644 --- a/src/keyDerivation.cpp +++ b/src/keyDerivation.cpp @@ -54,6 +54,7 @@ void KeyDerivation::setRole(const role_t role) { WritersLock lock(mutex_); role_ = role; + cLog.msg(Log::PRIO_NOTICE) << "KeyDerivation: using role " << role_; } #ifndef NO_CRYPT diff --git a/src/options.cpp b/src/options.cpp index 7505eb5..82481c0 100644 --- a/src/options.cpp +++ b/src/options.cpp @@ -51,6 +51,16 @@ std::ostream& operator<<(std::ostream& stream, syntax_error const& error) return stream; } +std::ostream& operator<<(std::ostream& stream, role_t const& role) +{ + switch(role) { + case ROLE_LEFT: stream << "left"; break; + case ROLE_RIGHT: stream << "right"; break; + default: stream << "unknown"; break; + } + return stream; +} + void OptionHost::init(std::string addrPort) { std::string origAddrPort(addrPort); diff --git a/src/options.h b/src/options.h index f2d6619..6905d3b 100644 --- a/src/options.h +++ b/src/options.h @@ -78,6 +78,7 @@ std::istream& operator>>(std::istream& stream, OptionNetwork& network); typedef std::list<std::string> StringList; typedef enum { ROLE_LEFT, ROLE_RIGHT } role_t; +std::ostream& operator<<(std::ostream& stream, role_t const& role); class Options { |