Some work toward Issue 27 and Issue 319

This commit is contained in:
Nick Bolton 2010-05-31 21:30:29 +00:00
parent fea12827d4
commit f974d8d680
74 changed files with 4057 additions and 3756 deletions

View file

@ -390,10 +390,10 @@ CClient::sendEvent(CEvent::Type type, void* data)
void
CClient::sendConnectionFailedEvent(const char* msg)
{
CFailInfo* info = (CFailInfo*)malloc(sizeof(CFailInfo) + strlen(msg));
info->m_retry = true;
strcpy(info->m_what, msg);
sendEvent(getConnectionFailedEvent(), info);
CFailInfo* info = new CFailInfo(msg);
info->m_retry = true;
CEvent event(getConnectionFailedEvent(), getEventTarget(), info, CEvent::kDontFreeData);
EVENTQUEUE->addEvent(event);
}
void
@ -549,7 +549,8 @@ CClient::handleConnectionFailed(const CEvent& event, void*)
delete m_stream;
m_stream = NULL;
LOG((CLOG_DEBUG1 "connection failed"));
sendConnectionFailedEvent(info->m_what);
sendConnectionFailedEvent(info->m_what.c_str());
delete info;
}
void