| 294 | } |
| 295 | |
| 296 | bool queue_manager::cache_check(queue_file* fp) |
| 297 | { |
| 298 | std::map<acl::string, queue_file*>::iterator it; |
| 299 | m_queueLocker.lock(); |
| 300 | it = m_queueList.find(fp->key()); |
| 301 | if (it == m_queueList.end()) { |
| 302 | m_queueLocker.unlock(); |
| 303 | logger_error("%s not exist in table", fp->key()); |
| 304 | return false; |
| 305 | } else if (it->second != fp) { |
| 306 | m_queueLocker.unlock(); |
| 307 | logger_error("%s no match %p %p", fp->key(), fp, it->second); |
| 308 | return false; |
| 309 | } |
| 310 | m_queueLocker.unlock(); |
| 311 | return true; |
| 312 | } |
| 313 | |
| 314 | bool queue_manager::cache_add(queue_file* fp) |
| 315 | { |