| 87 | } |
| 88 | #else |
| 89 | void |
| 90 | QUICPollCont::_process_long_header_packet(QUICPollEvent *e, NetHandler *nh) |
| 91 | { |
| 92 | UDPPacket *p = e->packet; |
| 93 | // FIXME: VC is nullptr ? |
| 94 | QUICNetVConnection *vc = static_cast<QUICNetVConnection *>(e->con); |
| 95 | uint8_t *buf = reinterpret_cast<uint8_t *>(p->getIOBlockChain()->buf()); |
| 96 | |
| 97 | QUICPacketType ptype; |
| 98 | QUICLongHeaderPacketR::type(ptype, buf, 1); |
| 99 | if (ptype == QUICPacketType::INITIAL && !vc->read.triggered) { |
| 100 | SCOPED_MUTEX_LOCK(lock, vc->mutex, this_ethread()); |
| 101 | vc->read.triggered = 1; |
| 102 | vc->handle_received_packet(p); |
| 103 | vc->handleEvent(QUIC_EVENT_PACKET_READ_READY, nullptr); |
| 104 | e->free(); |
| 105 | |
| 106 | return; |
| 107 | } |
| 108 | |
| 109 | if (vc) { |
| 110 | SCOPED_MUTEX_LOCK(lock, vc->mutex, this_ethread()); |
| 111 | vc->read.triggered = 1; |
| 112 | vc->handle_received_packet(p); |
| 113 | } else { |
| 114 | this->_longInQueue.push(p); |
| 115 | } |
| 116 | |
| 117 | // Push QUICNetVC into nethandler's enabled list |
| 118 | if (vc != nullptr) { |
| 119 | int isin = ink_atomic_swap(&vc->read.in_enabled_list, 1); |
| 120 | if (!isin) { |
| 121 | nh->read_enable_list.push(vc); |
| 122 | } |
| 123 | } |
| 124 | |
| 125 | // Note: We should free QUICPollEvent here since vc could be freed from other thread. |
| 126 | e->free(); |
| 127 | } |
| 128 | |
| 129 | void |
| 130 | QUICPollCont::_process_short_header_packet(QUICPollEvent *e, NetHandler *nh) |
no test coverage detected