mirror of https://github.com/Icinga/icinga2.git
compatido: cleanup idosocket build, works now with conninfo db hello handshake, still TODO
This commit is contained in:
parent
2c9ac33a32
commit
340a0583bf
|
@ -4,9 +4,11 @@ pkglib_LTLIBRARIES = \
|
||||||
compatido.la
|
compatido.la
|
||||||
|
|
||||||
compatido_la_SOURCES = \
|
compatido_la_SOURCES = \
|
||||||
|
i2-compatido.h \
|
||||||
|
idosocket.cpp \
|
||||||
|
idosocket.h \
|
||||||
compatidocomponent.cpp \
|
compatidocomponent.cpp \
|
||||||
compatidocomponent.h \
|
compatidocomponent.h
|
||||||
i2-compatido.h
|
|
||||||
|
|
||||||
compatido_la_CPPFLAGS = \
|
compatido_la_CPPFLAGS = \
|
||||||
$(BOOST_CPPFLAGS) \
|
$(BOOST_CPPFLAGS) \
|
||||||
|
|
|
@ -50,7 +50,7 @@ void IdoSocket::SendMessage(const String& message)
|
||||||
* as we inherit all the functionality
|
* as we inherit all the functionality
|
||||||
* of the tcpclient class
|
* of the tcpclient class
|
||||||
*/
|
*/
|
||||||
Write(message, message.size());
|
Write(message.CStr(), message.GetLength());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -59,23 +59,23 @@ void IdoSocket::SendMessage(const String& message)
|
||||||
*/
|
*/
|
||||||
void IdoSocket::DataAvailableHandler(void)
|
void IdoSocket::DataAvailableHandler(void)
|
||||||
{
|
{
|
||||||
for (;;) {
|
String sString;
|
||||||
string sString;
|
|
||||||
|
|
||||||
{
|
while (NetString::ReadStringFromIOQueue(this, &sString)) {
|
||||||
mutex::scoped_lock lock(GetMutex());
|
//std::cerr << "<< " << jsonString << std::endl;
|
||||||
|
|
||||||
if (!Netstring::ReadStringFromFIFO(GetRecvQueue(), &sString))
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
//message = MessagePart(jsonString);
|
// Value value = Value::Deserialize(jsonString);
|
||||||
//OnNewMessage(GetSelf(), message);
|
|
||||||
|
// if (!value.IsObjectType<Dictionary>())
|
||||||
|
// throw_exception(invalid_argument("JSON-RPC message must be a dictionary."));
|
||||||
|
|
||||||
|
// OnNewMessage(GetSelf(), MessagePart(value));
|
||||||
} catch (const exception& ex) {
|
} catch (const exception& ex) {
|
||||||
Logger::Write(LogCritical, "idosocket", "Exception while processing message from idosocket client: " + string(ex.what()));
|
Logger::Write(LogCritical, "jsonrpc", "Exception while processing message from JSON-RPC client: " + String(ex.what()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue