| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 6df1508 commit 6553202
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -386,6 +386,8 @@ const QuicError QuicError::FromConnectionClose(ngtcp2_conn* session) { | |||
| 386 | 386 | QUIC_TRANSPORT_ERRORS(V) | |
| 387 | 387 | #undef V | |
| 388 | 388 | ||
| 389 | + const QuicError QuicError::TRANSPORT_NO_ERROR = | ||
| 390 | + ForTransport(TransportError::NO_ERROR_); | ||
| 389 | 391 | const QuicError QuicError::HTTP3_NO_ERROR = ForApplication(NGHTTP3_H3_NO_ERROR); | |
| 390 | 392 | const QuicError QuicError::VERSION_NEGOTIATION = ForVersionNegotiation(); | |
| 391 | 393 | const QuicError QuicError::IDLE_CLOSE = ForIdleClose(); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -108,7 +108,6 @@ class Store final : public MemoryRetainer { | |||
| 108 | 108 | ||
| 109 | 109 | // Periodically, these need to be updated to match the latest ngtcp2 defs. | |
| 110 | 110 | #define QUIC_TRANSPORT_ERRORS(V) \ | |
| 111 | - V(NO_ERROR) \ | ||
| 112 | 111 | V(INTERNAL_ERROR) \ | |
| 113 | 112 | V(CONNECTION_REFUSED) \ | |
| 114 | 113 | V(FLOW_CONTROL_ERROR) \ | |
@@ -155,6 +154,10 @@ class QuicError final : public MemoryRetainer { | |||
| 155 | 154 | public: | |
| 156 | 155 | // The known error codes for the transport namespace. | |
| 157 | 156 | enum class TransportError : error_code { | |
| 157 | + // NO_ERROR has to be treated specially since it is a macro on | ||
| 158 | + // some Windows cases and results in a compile error if we leave | ||
| 159 | + // it as is. | ||
| 160 | + NO_ERROR_ = NGTCP2_NO_ERROR, | ||
| 158 | 161 | #define V(name) name = NGTCP2_##name, | |
| 159 | 162 | QUIC_TRANSPORT_ERRORS(V) | |
| 160 | 163 | #undef V | |
@@ -273,6 +276,7 @@ class QuicError final : public MemoryRetainer { | |||
| 273 | 276 | ||
| 274 | 277 | static const QuicError FromConnectionClose(ngtcp2_conn* session); | |
| 275 | 278 | ||
| 279 | + static const QuicError TRANSPORT_NO_ERROR; | ||
| 276 | 280 | #define V(name) static const QuicError TRANSPORT_##name; | |
| 277 | 281 | QUIC_TRANSPORT_ERRORS(V) | |
| 278 | 282 | #undef V | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -16,7 +16,7 @@ TEST(QuicError, NoError) { | |||
| 16 | 16 | CHECK_EQ(err.reason(), ""); | |
| 17 | 17 | CHECK_EQ(err, QuicError::TRANSPORT_NO_ERROR); | |
| 18 | 18 | ||
| 19 | - CHECK_EQ(QuicError::TransportError::NO_ERROR, QuicError::QUIC_NO_ERROR); | ||
| 19 | + CHECK_EQ(QuicError::TransportError::NO_ERROR_, QuicError::QUIC_NO_ERROR); | ||
| 20 | 20 | CHECK_EQ(QuicError::Http3Error::H3_NO_ERROR, QuicError::HTTP3_NO_ERROR_CODE); | |
| 21 | 21 | ||
| 22 | 22 | QuicError err2("a reason"); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments