TS-2760: Use TSFetchClientProtoStackSet() API in SPDY Setting client protocol stack in spdy_fetcher_launch() by using TSFetchClientProtoStackSet() API, so that the logging module can record protocol stack correctly.
And fix a trival bug when init proto_type_map for logging module. Signed-off-by: Yunkai Zhang <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/2309ec10 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/2309ec10 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/2309ec10 Branch: refs/heads/master Commit: 2309ec1013ec441f80e4710568af1152c1410231 Parents: 3f0f40b Author: Yunkai Zhang <[email protected]> Authored: Sun Apr 27 15:34:44 2014 +0800 Committer: Yunkai Zhang <[email protected]> Committed: Sun Apr 27 16:24:23 2014 +0800 ---------------------------------------------------------------------- proxy/logging/Log.cc | 2 +- proxy/spdy/SpdyCallbacks.cc | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2309ec10/proxy/logging/Log.cc ---------------------------------------------------------------------- diff --git a/proxy/logging/Log.cc b/proxy/logging/Log.cc index aeac203..52bfe16 100644 --- a/proxy/logging/Log.cc +++ b/proxy/logging/Log.cc @@ -366,7 +366,7 @@ Log::init_fields() ink_hash_table_insert (field_symbol_hash, "caun", field); Ptr<LogFieldAliasTable> proto_type_map = make_ptr(NEW(new LogFieldAliasTable)); - proto_type_map->init(4, + proto_type_map->init(7, // Transport protocols TS_PROTO_UDP, "UDP", TS_PROTO_TCP, "TCP", http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2309ec10/proxy/spdy/SpdyCallbacks.cc ---------------------------------------------------------------------- diff --git a/proxy/spdy/SpdyCallbacks.cc b/proxy/spdy/SpdyCallbacks.cc index 5858e6b..6f2de17 100644 --- a/proxy/spdy/SpdyCallbacks.cc +++ b/proxy/spdy/SpdyCallbacks.cc @@ -188,6 +188,12 @@ spdy_fetcher_launch(SpdyRequest *req, TSFetchMethod method) TSFetchUserDataSet(req->fetch_sm, req); // + // Set client protocol stack in FetchSM that needed by logging module + // + NetVConnection *netvc = (NetVConnection *)sm->net_vc; + TSFetchClientProtoStackSet(req->fetch_sm, netvc->proto_stack); + + // // Set header list // for (size_t i = 0; i < req->headers.size(); i++) {
