diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-26 10:29:59 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-26 10:29:59 +0000 |
commit | ef9d2cfde6b877081c468c6d550b1e48866e9ed0 (patch) | |
tree | 06a2d35c73bfee9212c3dda128d56c3f07608948 /doq.cc | |
parent | Adding upstream version 1.9.5. (diff) | |
download | dnsdist-upstream.tar.xz dnsdist-upstream.zip |
Adding upstream version 1.9.6.upstream/1.9.6upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | doq.cc | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -267,7 +267,12 @@ static bool tryWriteResponse(Connection& conn, const uint64_t streamID, PacketBu { size_t pos = 0; while (pos < response.size()) { +#ifdef HAVE_QUICHE_STREAM_ERROR_CODES + uint64_t quicheErrorCode{0}; + auto res = quiche_conn_stream_send(conn.d_conn.get(), streamID, &response.at(pos), response.size() - pos, true, &quicheErrorCode); +#else auto res = quiche_conn_stream_send(conn.d_conn.get(), streamID, &response.at(pos), response.size() - pos, true); +#endif if (res == QUICHE_ERR_DONE) { response.erase(response.begin(), response.begin() + static_cast<ssize_t>(pos)); return false; @@ -606,9 +611,17 @@ static void handleReadableStream(DOQFrontend& frontend, ClientState& clientState bool fin = false; auto existingLength = streamBuffer.size(); streamBuffer.resize(existingLength + 512); +#ifdef HAVE_QUICHE_STREAM_ERROR_CODES + uint64_t quicheErrorCode{0}; + auto received = quiche_conn_stream_recv(conn.d_conn.get(), streamID, + &streamBuffer.at(existingLength), 512, + &fin, + &quicheErrorCode); +#else auto received = quiche_conn_stream_recv(conn.d_conn.get(), streamID, &streamBuffer.at(existingLength), 512, &fin); +#endif if (received == 0 || received == QUICHE_ERR_DONE) { streamBuffer.resize(existingLength); return; |