more temp logging to try and understand why IEventQueue singleton is being used on build machines.

This commit is contained in:
Nick Bolton 2013-04-11 04:53:59 +00:00
parent 0f60fdbd9e
commit 7dcc1151c7
3 changed files with 20 additions and 4 deletions

View File

@ -61,6 +61,7 @@ CClientProxy::getStream() const
CEvent::Type
CClientProxy::getReadyEvent()
{
LOG((CLOG_DEBUG4 "getReadyEvent"));
return EVENTQUEUE->registerTypeOnce(s_readyEvent,
"CClientProxy::ready");
}
@ -68,6 +69,7 @@ CClientProxy::getReadyEvent()
CEvent::Type
CClientProxy::getDisconnectedEvent()
{
LOG((CLOG_DEBUG4 "getDisconnectedEvent"));
return EVENTQUEUE->registerTypeOnce(s_disconnectedEvent,
"CClientProxy::disconnected");
}
@ -75,6 +77,7 @@ CClientProxy::getDisconnectedEvent()
CEvent::Type
CClientProxy::getClipboardChangedEvent()
{
LOG((CLOG_DEBUG4 "getClipboardChangedEvent"));
return EVENTQUEUE->registerTypeOnce(s_clipboardChangedEvent,
"CClientProxy::clipboardChanged");
}

View File

@ -89,6 +89,7 @@ CClientProxy1_3::addHeartbeatTimer()
{
// create and install a timer to periodically send keep alives
if (m_keepAliveRate > 0.0) {
LOG((CLOG_DEBUG4 "addHeartbeatTimer"));
m_keepAliveTimer = EVENTQUEUE->newTimer(m_keepAliveRate, NULL);
EVENTQUEUE->adoptHandler(CEvent::kTimer, m_keepAliveTimer,
new TMethodEventJob<CClientProxy1_3>(this,
@ -104,6 +105,7 @@ CClientProxy1_3::removeHeartbeatTimer()
{
// remove the timer that sends keep alives periodically
if (m_keepAliveTimer != NULL) {
LOG((CLOG_DEBUG4 "removeHeartbeatTimer"));
EVENTQUEUE->removeHandler(CEvent::kTimer, m_keepAliveTimer);
EVENTQUEUE->deleteTimer(m_keepAliveTimer);
m_keepAliveTimer = NULL;

View File

@ -48,6 +48,7 @@ CClientProxyUnknown::CClientProxyUnknown(synergy::IStream* stream, double timeou
{
assert(m_server != NULL);
LOG((CLOG_DEBUG4 "CClientProxyUnknown"));
EVENTQUEUE->adoptHandler(CEvent::kTimer, this,
new TMethodEventJob<CClientProxyUnknown>(this,
&CClientProxyUnknown::handleTimeout, NULL));
@ -85,6 +86,7 @@ CClientProxyUnknown::orphanClientProxy()
CEvent::Type
CClientProxyUnknown::getSuccessEvent()
{
LOG((CLOG_DEBUG4 "getSuccessEvent"));
return EVENTQUEUE->registerTypeOnce(s_successEvent,
"CClientProxy::success");
}
@ -92,6 +94,7 @@ CClientProxyUnknown::getSuccessEvent()
CEvent::Type
CClientProxyUnknown::getFailureEvent()
{
LOG((CLOG_DEBUG4 "getFailureEvent"));
return EVENTQUEUE->registerTypeOnce(s_failureEvent,
"CClientProxy::failure");
}
@ -101,6 +104,7 @@ CClientProxyUnknown::sendSuccess()
{
m_ready = true;
removeTimer();
LOG((CLOG_DEBUG4 "sendSuccess"));
EVENTQUEUE->addEvent(CEvent(getSuccessEvent(), this));
}
@ -112,6 +116,7 @@ CClientProxyUnknown::sendFailure()
m_ready = false;
removeHandlers();
removeTimer();
LOG((CLOG_DEBUG4 "sendFailure"));
EVENTQUEUE->addEvent(CEvent(getFailureEvent(), this));
}
@ -120,6 +125,7 @@ CClientProxyUnknown::addStreamHandlers()
{
assert(m_stream != NULL);
LOG((CLOG_DEBUG4 "addStreamHandlers"));
EVENTQUEUE->adoptHandler(m_stream->getInputReadyEvent(),
m_stream->getEventTarget(),
new TMethodEventJob<CClientProxyUnknown>(this,
@ -143,6 +149,7 @@ CClientProxyUnknown::addProxyHandlers()
{
assert(m_proxy != NULL);
LOG((CLOG_DEBUG4 "addProxyHandlers"));
EVENTQUEUE->adoptHandler(CClientProxy::getReadyEvent(),
m_proxy,
new TMethodEventJob<CClientProxyUnknown>(this,
@ -157,6 +164,7 @@ void
CClientProxyUnknown::removeHandlers()
{
if (m_stream != NULL) {
LOG((CLOG_DEBUG4 "removeHandlers"));
EVENTQUEUE->removeHandler(m_stream->getInputReadyEvent(),
m_stream->getEventTarget());
EVENTQUEUE->removeHandler(m_stream->getOutputErrorEvent(),
@ -167,6 +175,7 @@ CClientProxyUnknown::removeHandlers()
m_stream->getEventTarget());
}
if (m_proxy != NULL) {
LOG((CLOG_DEBUG4 "removeHandlers"));
EVENTQUEUE->removeHandler(CClientProxy::getReadyEvent(),
m_proxy);
EVENTQUEUE->removeHandler(CClientProxy::getDisconnectedEvent(),
@ -178,6 +187,7 @@ void
CClientProxyUnknown::removeTimer()
{
if (m_timer != NULL) {
LOG((CLOG_DEBUG4 "removeTimer"));
EVENTQUEUE->deleteTimer(m_timer);
EVENTQUEUE->removeHandler(CEvent::kTimer, this);
m_timer = NULL;
@ -215,6 +225,7 @@ CClientProxyUnknown::handleData(const CEvent&, void*)
// remove those later.
removeHandlers();
LOG((CLOG_DEBUG4 "handleData"));
// create client proxy for highest version supported by the client
if (major == 1) {
switch (minor) {