[
https://issues.apache.org/jira/browse/TS-4703?focusedWorklogId=28799&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-28799
]
ASF GitHub Bot logged work on TS-4703:
--------------------------------------
Author: ASF GitHub Bot
Created on: 12/Sep/16 16:48
Start Date: 12/Sep/16 16:48
Worklog Time Spent: 10m
Work Description: Github user jpeach commented on a diff in the pull
request:
https://github.com/apache/trafficserver/pull/1007#discussion_r78409374
--- Diff: iocore/net/NetVConnection.cc ---
@@ -43,3 +44,39 @@ NetVConnection::cancel_OOB()
{
return;
}
+
+const char *
+NetVCOptions::get_proto_string() const
+{
+ const char *retval;
+ switch (ip_proto) {
+ case USE_TCP:
+ retval = TS_PROTO_TAG_TCP;
+ break;
+ case USE_UDP:
+ retval = TS_PROTO_TAG_UDP;
+ break;
+ default:
+ retval = NULL;
+ break;
+ }
+ return retval;
+}
--- End diff --
I think this would be more succinct:
```C
switch (ip_proto) {
case USE_TCP:
return TS_PROTO_TAG_TCP;
case USE_UDP:
return TS_PROTO_TAG_UDP;
default:
return NULL;
}
```
Issue Time Tracking
-------------------
Worklog Id: (was: 28799)
Time Spent: 5.5h (was: 5h 20m)
> Adds an API call to retrieve transaction protocol
> -------------------------------------------------
>
> Key: TS-4703
> URL: https://issues.apache.org/jira/browse/TS-4703
> Project: Traffic Server
> Issue Type: Improvement
> Components: TS API
> Reporter: Petar Penkov
> Assignee: Susan Hinrichs
> Fix For: 7.0.0
>
> Time Spent: 5.5h
> Remaining Estimate: 0h
>
> It would be useful if there was a way to retrieve the underlying protocol for
> a given transaction through the tsapi at the very least for plugin logging
> purposes. This can be achieved with a very simple method since this
> information is already available internally.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)