Revert revision: 053bfe8ad9, this cause some crash.

Use dynamic_cast more is safer.
I think no more crash on db code.

--HG--
branch : trunk
This commit is contained in:
n0n4m3 committed 2010-02-10 16:04:48 +03:00
1 parent 1e4684826e
commit 293ea07a25
3 files changed
+14 -9

No files matched your search

+2 -1
View File
@@ -32,13 +32,14 @@ void SqlDelayThread::run()
mysql_thread_init();
#endif
SqlAsyncTask * s = NULL;
// Lets wait for next async task no more than 2 secs
ACE_Time_Value _time(2);
while (m_running)
{
// if the running state gets turned off while sleeping
// empty the queue before exiting
SqlAsyncTask * s = (SqlAsyncTask*)m_sqlQueue.dequeue(/*&_time*/);
s = dynamic_cast<SqlAsyncTask*> (m_sqlQueue.dequeue());
if(s)
{
s->call();