From c6c9eb1c02600edfb34b01b3003f08d7e23882d4 Mon Sep 17 00:00:00 2001 From: SoftCoder Date: Mon, 18 Jan 2016 11:49:11 -0800 Subject: [PATCH] - try to fix irc thread crash and add more verbose output --- source/shared_lib/sources/platform/posix/ircclient.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/source/shared_lib/sources/platform/posix/ircclient.cpp b/source/shared_lib/sources/platform/posix/ircclient.cpp index 095bee948..ab9e2a34f 100644 --- a/source/shared_lib/sources/platform/posix/ircclient.cpp +++ b/source/shared_lib/sources/platform/posix/ircclient.cpp @@ -86,10 +86,19 @@ void dump_event (irc_session_t * session, const char * event, const char * origi IRCThread *ctx = (IRCThread *)irc_get_ctx(session); if(ctx != NULL) { + if(SystemFlags::VERBOSE_MODE_ENABLED || IRCThread::debugEnabled) printf ("===> IRC: Line: %d\n", __LINE__); + if(ctx->getQuitStatus()) { + if(SystemFlags::VERBOSE_MODE_ENABLED || IRCThread::debugEnabled) printf ("===> IRC: Line: %d\n", __LINE__); + return; + } + if(SystemFlags::VERBOSE_MODE_ENABLED || IRCThread::debugEnabled) printf ("===> IRC: Line: %d\n", __LINE__); if(difftime(time(NULL),ctx->getLastNickListUpdate()) >= 7) { + if(SystemFlags::VERBOSE_MODE_ENABLED || IRCThread::debugEnabled) printf ("===> IRC: Line: %d\n", __LINE__); ctx->setLastNickListUpdate(time(NULL)); + if(SystemFlags::VERBOSE_MODE_ENABLED || IRCThread::debugEnabled) printf ("===> IRC: Line: %d\n", __LINE__); ctx->GetIRCConnectedNickList(ctx->getChannel(),false); } + if(SystemFlags::VERBOSE_MODE_ENABLED || IRCThread::debugEnabled) printf ("===> IRC: Line: %d\n", __LINE__); } }