| 214 | CapturePacket::~CapturePacket() = default; |
| 215 | |
| 216 | void CapturePacket::onTrigger(const std::shared_ptr<core::ProcessContext> &context, const std::shared_ptr<core::ProcessSession> &session) { |
| 217 | CapturePacketMechanism *capture; |
| 218 | if (mover->sink.try_dequeue(capture)) { |
| 219 | auto ff = session->create(); |
| 220 | session->import(capture->getFile(), ff, false, 0); |
| 221 | logger_->log_debug("Received packet capture in file %s %d for %s", capture->getFile(), capture->getSize(), ff->getResourceClaim()->getContentFullPath()); |
| 222 | session->transfer(ff, Success); |
| 223 | delete capture; |
| 224 | } else { |
| 225 | context->yield(); |
| 226 | } |
| 227 | } |
| 228 | |
| 229 | } |
| 230 | /* namespace processors */ |
nothing calls this directly
no test coverage detected