You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ma...@apache.org on 2018/09/11 07:01:59 UTC
[trafficserver] branch quic-latest updated (4fa51aa -> 9867db7)
This is an automated email from the ASF dual-hosted git repository.
masaori pushed a change to branch quic-latest
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.
from 4fa51aa Remove unused function declarations from QUICStream
new ad7f44d Fix setting Transport Parameters on client side
new 9867db7 Cleanup: Remove local_max_stream_data for stream 0
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
iocore/net/quic/QUICHandshake.cc | 9 ++++++++-
iocore/net/quic/QUICStreamManager.cc | 14 +++++---------
2 files changed, 13 insertions(+), 10 deletions(-)
[trafficserver] 01/02: Fix setting Transport Parameters on client
side
Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
masaori pushed a commit to branch quic-latest
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
commit ad7f44d83823bf75127fbcbda63172178ce0b0e6
Author: Masaori Koshiba <ma...@apache.org>
AuthorDate: Tue Sep 11 15:31:46 2018 +0900
Fix setting Transport Parameters on client side
---
iocore/net/quic/QUICHandshake.cc | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/iocore/net/quic/QUICHandshake.cc b/iocore/net/quic/QUICHandshake.cc
index 5f340ac..7865bf4 100644
--- a/iocore/net/quic/QUICHandshake.cc
+++ b/iocore/net/quic/QUICHandshake.cc
@@ -219,6 +219,12 @@ bool
QUICHandshake::check_remote_transport_parameters()
{
auto tp = this->_hs_protocol->remote_transport_parameters();
+
+ if (tp == nullptr) {
+ // nothing to check
+ return true;
+ }
+
if (std::dynamic_pointer_cast<const QUICTransportParametersInClientHello>(tp)) {
return this->_check_remote_transport_parameters(std::static_pointer_cast<const QUICTransportParametersInClientHello>(tp));
} else {
@@ -369,8 +375,8 @@ QUICHandshake::_load_local_server_transport_parameters(QUICVersion negotiated_ve
// MAYs
tp->set(QUICTransportParameterId::INITIAL_MAX_BIDI_STREAMS, params->initial_max_bidi_streams_in());
tp->set(QUICTransportParameterId::INITIAL_MAX_UNI_STREAMS, params->initial_max_uni_streams_in());
- this->_local_transport_parameters = std::shared_ptr<QUICTransportParameters>(tp);
+ this->_local_transport_parameters = std::shared_ptr<QUICTransportParameters>(tp);
this->_hs_protocol->set_local_transport_parameters(this->_local_transport_parameters);
}
@@ -390,6 +396,7 @@ QUICHandshake::_load_local_client_transport_parameters(QUICVersion initial_versi
tp->set(QUICTransportParameterId::INITIAL_MAX_BIDI_STREAMS, params->initial_max_bidi_streams_out());
tp->set(QUICTransportParameterId::INITIAL_MAX_UNI_STREAMS, params->initial_max_uni_streams_out());
+ this->_local_transport_parameters = std::shared_ptr<QUICTransportParameters>(tp);
this->_hs_protocol->set_local_transport_parameters(std::unique_ptr<QUICTransportParameters>(tp));
}
[trafficserver] 02/02: Cleanup: Remove local_max_stream_data for
stream 0
Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
masaori pushed a commit to branch quic-latest
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
commit 9867db720f5473287e240cec6f9bc7e1055e0597
Author: Masaori Koshiba <ma...@apache.org>
AuthorDate: Tue Sep 11 15:59:59 2018 +0900
Cleanup: Remove local_max_stream_data for stream 0
---
iocore/net/quic/QUICStreamManager.cc | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/iocore/net/quic/QUICStreamManager.cc b/iocore/net/quic/QUICStreamManager.cc
index b6e8fe0..aa5d38a 100644
--- a/iocore/net/quic/QUICStreamManager.cc
+++ b/iocore/net/quic/QUICStreamManager.cc
@@ -274,15 +274,11 @@ QUICStreamManager::_find_or_create_stream(QUICStreamId stream_id)
return nullptr;
}
- uint64_t local_max_stream_data = 0;
- uint64_t remote_max_stream_data = 0;
- if (this->_local_tp) {
- local_max_stream_data = this->_local_tp->getAsUInt32(QUICTransportParameterId::INITIAL_MAX_STREAM_DATA),
- remote_max_stream_data = this->_remote_tp->getAsUInt32(QUICTransportParameterId::INITIAL_MAX_STREAM_DATA);
- } else {
- QUICConfig::scoped_config params;
- local_max_stream_data = params->initial_max_stream_data();
- }
+ ink_assert(this->_local_tp);
+ ink_assert(this->_remote_tp);
+
+ uint64_t local_max_stream_data = this->_local_tp->getAsUInt32(QUICTransportParameterId::INITIAL_MAX_STREAM_DATA);
+ uint64_t remote_max_stream_data = this->_remote_tp->getAsUInt32(QUICTransportParameterId::INITIAL_MAX_STREAM_DATA);
// TODO Free the stream somewhere
stream = THREAD_ALLOC(quicStreamAllocator, this_ethread());