| 366 | } |
| 367 | |
| 368 | void setError(IStatus* status, bool stopTask) |
| 369 | { |
| 370 | const bool copyStatus = (m_status.isSuccess() && status && status->getState() == IStatus::STATE_ERRORS); |
| 371 | if (!copyStatus && (!stopTask || m_stop)) |
| 372 | return; |
| 373 | |
| 374 | MutexLockGuard guard(m_mutex, FB_FUNCTION); |
| 375 | if (m_status.isSuccess() && copyStatus) |
| 376 | m_status.save(status); |
| 377 | if (stopTask) |
| 378 | m_stop = true; |
| 379 | } |
| 380 | |
| 381 | MemoryPool* m_pool; |
| 382 | Database* m_dbb; |