mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-24 06:05:01 +02:00
Code cleanups.
This commit is contained in:
parent
728f72dcce
commit
7f4c3f84be
@ -295,7 +295,7 @@ Component::Ptr Application::GetComponent(const string& name) const
|
|||||||
* @param facility The log facility.
|
* @param facility The log facility.
|
||||||
* @param message The message.
|
* @param message The message.
|
||||||
*/
|
*/
|
||||||
void Application::Log(LogSeverity severity, string facility, string message)
|
void Application::Log(LogSeverity severity, const string& facility, const string& message)
|
||||||
{
|
{
|
||||||
char timestamp[100];
|
char timestamp[100];
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ public:
|
|||||||
|
|
||||||
static void Shutdown(void);
|
static void Shutdown(void);
|
||||||
|
|
||||||
static void Log(LogSeverity severity, string facility, string message);
|
static void Log(LogSeverity severity, const string& facility, const string& message);
|
||||||
|
|
||||||
shared_ptr<Component> LoadComponent(const string& path,
|
shared_ptr<Component> LoadComponent(const string& path,
|
||||||
const ConfigObject::Ptr& componentConfig);
|
const ConfigObject::Ptr& componentConfig);
|
||||||
|
@ -51,6 +51,12 @@ long Dictionary::GetLength(void) const
|
|||||||
return m_Data.size();
|
return m_Data.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks whether the dictionary contains the specified key.
|
||||||
|
*
|
||||||
|
* @param key The key.
|
||||||
|
* @returns true if the dictionary contains the key, false otherwise.
|
||||||
|
*/
|
||||||
bool Dictionary::Contains(const string& key) const
|
bool Dictionary::Contains(const string& key) const
|
||||||
{
|
{
|
||||||
return (m_Data.find(key) != m_Data.end());
|
return (m_Data.find(key) != m_Data.end());
|
||||||
|
@ -87,9 +87,7 @@ shared_ptr<SSL_CTX> Utility::MakeSSLContext(string pubkey, string privkey, strin
|
|||||||
{
|
{
|
||||||
InitializeOpenSSL();
|
InitializeOpenSSL();
|
||||||
|
|
||||||
SSL_METHOD *sslMethod = (SSL_METHOD *)TLSv1_method();
|
shared_ptr<SSL_CTX> sslContext = shared_ptr<SSL_CTX>(SSL_CTX_new(TLSv1_method()), SSL_CTX_free);
|
||||||
|
|
||||||
shared_ptr<SSL_CTX> sslContext = shared_ptr<SSL_CTX>(SSL_CTX_new(sslMethod), SSL_CTX_free);
|
|
||||||
|
|
||||||
SSL_CTX_set_mode(sslContext.get(), SSL_MODE_ENABLE_PARTIAL_WRITE | SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER);
|
SSL_CTX_set_mode(sslContext.get(), SSL_MODE_ENABLE_PARTIAL_WRITE | SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user