| | |
| | | return FALSE; |
| | | } |
| | | |
| | | // 如果没有可用位置,报错 |
| | | Lock(); |
| | | CSlot* pSlot = getSlot(putSlot - 1); |
| | | ASSERT(pSlot); |
| | | if (pSlot->getContext() != nullptr) { |
| | | Unlock(); |
| | | LOGE("<CEquipemnt-%s>onPreStoredJob,指定slot(port:%d)有料,请注意风险!", m_strName.c_str(), port); |
| | | return FALSE; |
| | | } |
| | | Unlock(); |
| | | |
| | | |
| | | if (m_listener.onPreStoredJob != nullptr) { |
| | | if (!m_listener.onPreStoredJob(this, port, pJobDataB, putSlot)) { |
| | | return FALSE; |
| | |
| | | } |
| | | } |
| | | |
| | | // 如果没有可用位置,报错(需在 listener 回调后拿到 putSlot) |
| | | if (putSlot <= 0) { |
| | | LOGE("<CEquipemnt-%s>onPreStoredJob, putSlot无效(port:%d).", m_strName.c_str(), port); |
| | | return FALSE; |
| | | } |
| | | Lock(); |
| | | CSlot* pSlot = getSlot(putSlot - 1); |
| | | ASSERT(pSlot); |
| | | if (pSlot->getContext() != nullptr) { |
| | | Unlock(); |
| | | LOGE("<CEquipemnt-%s>onPreStoredJob,指定slot(port:%d)有料,请注意风险!", m_strName.c_str(), port); |
| | | return FALSE; |
| | | } |
| | | Unlock(); |
| | | |
| | | return TRUE; |
| | | } |
| | | |