Win32 bugfixes.

This commit is contained in:
Gunnar Beutner 2012-07-01 13:21:49 +02:00
parent 26396f9e7b
commit 334c247655
10 changed files with 111 additions and 10 deletions

View File

@ -21,6 +21,7 @@
<ClCompile Include="object.cpp" /> <ClCompile Include="object.cpp" />
<ClCompile Include="objectmap.cpp" /> <ClCompile Include="objectmap.cpp" />
<ClCompile Include="objectset.cpp" /> <ClCompile Include="objectset.cpp" />
<ClCompile Include="ringbuffer.cpp" />
<ClCompile Include="socket.cpp" /> <ClCompile Include="socket.cpp" />
<ClCompile Include="tcpclient.cpp" /> <ClCompile Include="tcpclient.cpp" />
<ClCompile Include="tcpserver.cpp" /> <ClCompile Include="tcpserver.cpp" />
@ -45,6 +46,7 @@
<ClInclude Include="fifo.h" /> <ClInclude Include="fifo.h" />
<ClInclude Include="i2-base.h" /> <ClInclude Include="i2-base.h" />
<ClInclude Include="object.h" /> <ClInclude Include="object.h" />
<ClInclude Include="ringbuffer.h" />
<ClInclude Include="socket.h" /> <ClInclude Include="socket.h" />
<ClInclude Include="tcpclient.h" /> <ClInclude Include="tcpclient.h" />
<ClInclude Include="tcpserver.h" /> <ClInclude Include="tcpserver.h" />

View File

@ -4,7 +4,7 @@
namespace icinga namespace icinga
{ {
class Ringbuffer class I2_BASE_API Ringbuffer
{ {
public: public:
Ringbuffer(int slots); Ringbuffer(int slots);

View File

@ -333,7 +333,7 @@ bool DiscoveryComponent::HasMessagePermission(const Dictionary::Ptr& roles, cons
if (!permissions) if (!permissions)
throw runtime_error("Object is not a dictionary."); throw runtime_error("Object is not a dictionary.");
for (DictionaryIterator is = permissions->Begin(); is != permissions->End(); is++) { for (Dictionary::Iterator is = permissions->Begin(); is != permissions->End(); is++) {
if (Utility::Match(is->second.GetString(), message)) if (Utility::Match(is->second.GetString(), message))
return true; return true;
} }
@ -383,7 +383,7 @@ void DiscoveryComponent::ProcessDiscoveryMessage(const string& identity, const D
MessagePart publications; MessagePart publications;
if (message.GetPublications(&publications)) { if (message.GetPublications(&publications)) {
DictionaryIterator i; Dictionary::Iterator i;
for (i = publications.Begin(); i != publications.End(); i++) { for (i = publications.Begin(); i != publications.End(); i++) {
if (trusted || HasMessagePermission(roles, "publications", i->second)) { if (trusted || HasMessagePermission(roles, "publications", i->second)) {
info->Publications.insert(i->second); info->Publications.insert(i->second);
@ -395,7 +395,7 @@ void DiscoveryComponent::ProcessDiscoveryMessage(const string& identity, const D
MessagePart subscriptions; MessagePart subscriptions;
if (message.GetSubscriptions(&subscriptions)) { if (message.GetSubscriptions(&subscriptions)) {
DictionaryIterator i; Dictionary::Iterator i;
for (i = subscriptions.Begin(); i != subscriptions.End(); i++) { for (i = subscriptions.Begin(); i != subscriptions.End(); i++) {
if (trusted || HasMessagePermission(roles, "subscriptions", i->second)) { if (trusted || HasMessagePermission(roles, "subscriptions", i->second)) {
info->Subscriptions.insert(i->second); info->Subscriptions.insert(i->second);

33
icinga-app/icinga-c1.pem Normal file
View File

@ -0,0 +1,33 @@
-----BEGIN CERTIFICATE-----
MIICtzCCAiCgAwIBAgIBADANBgkqhkiG9w0BAQUFADBoMQswCQYDVQQGEwJERTEQ
MA4GA1UECAwHQmF2YXJpYTESMBAGA1UEBwwJTnVyZW1iZXJnMRUwEwYDVQQKDAxO
RVRXQVlTIEdtYkgxHDAaBgNVBAMME0ljaW5nYSBTbmFrZSBPaWwgQ0EwHhcNMTIw
NDI0MTE0NzQ2WhcNMTMwNDI0MTE0NzQ2WjBeMQswCQYDVQQGEwJERTEQMA4GA1UE
CAwHQmF2YXJpYTESMBAGA1UEBwwJTnVyZW1iZXJnMRUwEwYDVQQKDAxORVRXQVlT
IEdtYkgxEjAQBgNVBAMMCWljaW5nYS1jMTCBnzANBgkqhkiG9w0BAQEFAAOBjQAw
gYkCgYEAysHrzHs9WfQR4cEUx2hFZQmbM+Ssi5L63yqnzxEvVQ3GlM+uIceK1Kvx
9EexoUDLhxJOaUmigc6Pcs2mAjcpEwObnzW4pLuMKa7ngGLrnUpmmDXdGoxkCbi7
CP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pDtNLXzbek/KeI
ymg0LgRkHoWNpLY=
-----END PRIVATE KEY-----

28
icinga-app/icinga-c3.pem Normal file
View File

@ -0,0 +1,28 @@
-----BEGIN CERTIFICATE-----
MIICNTCCAZ4CAQQwDQYJKoZIhvcNAQEFBQAwaDELMAkGA1UEBhMCREUxEDAOBgNV
BAgMB0JhdmFyaWExEjAQBgNVBAcMCU51cmVtYmVyZzEVMBMGA1UECgwMTkVUV0FZ
UyBHbWJIMRwwGgYDVQQDDBNJY2luZ2EgU25ha2UgT2lsIENBMB4XDTEyMDUwODA3
MzkxOVoXDTIyMDUwNjA3MzkxOVowXjELMAkGA1UEBhMCREUxEDAOBgNVBAgMB0Jh
dmFyaWExEjAQBgNVBAcMCU51cmVtYmVyZzEVMBMGA1UECgwMTkVUV0FZUyBHbWJI
MRIwEAYDVQQDDAlpY2luZ2EtYzMwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGB
AKFf+UkCgbNtEP0OoeF+K02L5SRlqkkkp6eaieh0IN7NNAxeELcGpZmycv4sHp30
qv0zDtKU1HYrpm8TEBsz2AoT+J36QT9IysfcWdM9o3WZGMDUVqYBUscurkxBQJCK
cFwXijTJ8Djn82xVgNUm/E44AdbrIwUlx23yllErx8hfAgMBAAEwDQYJKoZIhvcN
AQEFBQADgYEAsZOKZQ2+ksPiNTCJrY+uiUZs6lFSbcJ9BHHaAt0ytQPiblufz3xl
AR5Hza5fHt+lN9aGxM7TWMhjZHhmoctSRz8AW1KZTdbxJhRdbqmBjl95c2wBiDxs
ERpyU9m9Rp42IjTyU4Vr/yO7DgMcG2k4KYzNquA5O8rqqtPRAp3H6n0=
-----END CERTIFICATE----------BEGIN RSA PRIVATE KEY-----
MIICXAIBAAKBgQChX/lJAoGzbRD9DqHhfitNi+UkZapJJKenmonodCDezTQMXhC3
BqWZsnL+LB6d9Kr9Mw7SlNR2K6ZvExAbM9gKE/id+kE/SMrH3FnTPaN1mRjA1Fam
AVLHLq5MQUCQinBcF4o0yfA45/NsVYDVJvxOOAHW6yMFJcdt8pZRK8fIXwIDAQAB
AoGASJwWXnNySHlam4Jp9DwA3/OCNs5HwIFtrkwqoR0fbSCHusjYXIHxISbZ9uOD
Iy9jgGno0XeF4WXijTfWl2bMXYWTS7ISMBg96bPZtG/RTdgd1LT69s82a+apbgSd
bxB64cyn8KtuABfZ9AMR+TV28TDmnGMdhVoaM66iWKv4a4ECQQDNmk3NTZ+s/y5F
5qOgJqH5yX1hZLLmm8e8lpghqDT43HR3cMJLN6b5oS1UdMcEw1Q6q3hjFl+MbnZa
AzvzpT9DAkEAyO5YdpbRG1OR7sNmidowvr1NkIjV/C4UuSpGrx9XJFAZkLxEEmMu
13QssdHjAkX5yFjkoNPC+wA6DeVjtvHatQJBAMG1qavOgKyLV9t/65XOEDm5Pqnu
KCfhiZQDBp5fTllRy2FlGYmoi2cSFhVGWOQB7G/CchBZWfiDcnpoJanufOUCQGr7
bKKHnoKcNmEYLOpNABMum7PPB5AjwOjt94CagT1WYKZNdzkLEg+pTXrIM8QsGdhw
bBqtZW1bK43mivcHQtkCQF+p7LfzmPo9uzRrOfjgTDYLuh3MD8EKNs0M6l15UqbQ
nfBBE0oIPH4j+K++7xWUQ7vbiyBc7C7H3NZeE6xqfS0=
-----END RSA PRIVATE KEY-----

View File

@ -4,7 +4,7 @@
namespace icinga namespace icinga
{ {
class CheckResult : public MessagePart class I2_ICINGA_API CheckResult : public MessagePart
{ {
public: public:
CheckResult(void) : MessagePart() { } CheckResult(void) : MessagePart() { }

View File

@ -11,32 +11,38 @@
</ProjectConfiguration> </ProjectConfiguration>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="checkresult.cpp" />
<ClCompile Include="checktask.cpp" /> <ClCompile Include="checktask.cpp" />
<ClCompile Include="cib.cpp" />
<ClCompile Include="configobjectadapter.cpp" /> <ClCompile Include="configobjectadapter.cpp" />
<ClCompile Include="endpoint.cpp" /> <ClCompile Include="endpoint.cpp" />
<ClCompile Include="endpointmanager.cpp" /> <ClCompile Include="endpointmanager.cpp" />
<ClCompile Include="host.cpp" /> <ClCompile Include="host.cpp" />
<ClCompile Include="hostgroup.cpp" />
<ClCompile Include="icingaapplication.cpp" /> <ClCompile Include="icingaapplication.cpp" />
<ClCompile Include="icingacomponent.cpp" />
<ClCompile Include="jsonrpcendpoint.cpp" /> <ClCompile Include="jsonrpcendpoint.cpp" />
<ClCompile Include="macroprocessor.cpp" /> <ClCompile Include="macroprocessor.cpp" />
<ClCompile Include="nagioschecktask.cpp" /> <ClCompile Include="nagioschecktask.cpp" />
<ClCompile Include="service.cpp" /> <ClCompile Include="service.cpp" />
<ClCompile Include="servicegroup.cpp" />
<ClCompile Include="virtualendpoint.cpp" /> <ClCompile Include="virtualendpoint.cpp" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="checkresult.h" />
<ClInclude Include="checktask.h" /> <ClInclude Include="checktask.h" />
<ClInclude Include="cib.h" />
<ClInclude Include="configobjectadapter.h" /> <ClInclude Include="configobjectadapter.h" />
<ClInclude Include="endpoint.h" /> <ClInclude Include="endpoint.h" />
<ClInclude Include="endpointmanager.h" /> <ClInclude Include="endpointmanager.h" />
<ClInclude Include="host.h" /> <ClInclude Include="host.h" />
<ClInclude Include="hostgroup.h" />
<ClInclude Include="i2-icinga.h" /> <ClInclude Include="i2-icinga.h" />
<ClInclude Include="icingaapplication.h" /> <ClInclude Include="icingaapplication.h" />
<ClInclude Include="icingacomponent.h" />
<ClInclude Include="jsonrpcendpoint.h" /> <ClInclude Include="jsonrpcendpoint.h" />
<ClInclude Include="macroprocessor.h" /> <ClInclude Include="macroprocessor.h" />
<ClInclude Include="nagioschecktask.h" /> <ClInclude Include="nagioschecktask.h" />
<ClInclude Include="service.h" /> <ClInclude Include="service.h" />
<ClInclude Include="servicegroup.h" />
<ClInclude Include="virtualendpoint.h" /> <ClInclude Include="virtualendpoint.h" />
</ItemGroup> </ItemGroup>
<PropertyGroup Label="Globals"> <PropertyGroup Label="Globals">

View File

@ -186,7 +186,7 @@ Dictionary::Ptr Service::GetLastCheckResult(void) const
void Service::SetLastStateChange(time_t ts) void Service::SetLastStateChange(time_t ts)
{ {
GetConfigObject()->SetTag("last_state_change", ts); GetConfigObject()->SetTag("last_state_change", static_cast<long>(ts));
} }
time_t Service::GetLastStateChange(void) const time_t Service::GetLastStateChange(void) const
@ -199,7 +199,7 @@ time_t Service::GetLastStateChange(void) const
void Service::SetLastHardStateChange(time_t ts) void Service::SetLastHardStateChange(time_t ts)
{ {
GetConfigObject()->SetTag("last_hard_state_change", ts); GetConfigObject()->SetTag("last_hard_state_change", static_cast<long>(ts));
} }
time_t Service::GetLastHardStateChange(void) const time_t Service::GetLastHardStateChange(void) const

View File

@ -20,7 +20,7 @@ enum ServiceStateType
StateTypeHard StateTypeHard
}; };
struct CheckResult; class CheckResult;
class I2_ICINGA_API Service : public ConfigObjectAdapter class I2_ICINGA_API Service : public ConfigObjectAdapter
{ {