mirror of
https://github.com/debauchee/barrier.git
synced 2026-02-10 21:56:13 +08:00
Some work toward Issue 27 and Issue 319
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user