[
https://issues.apache.org/jira/browse/TS-4555?focusedWorklogId=28177&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-28177
]
ASF GitHub Bot logged work on TS-4555:
--------------------------------------
Author: ASF GitHub Bot
Created on: 06/Sep/16 14:51
Start Date: 06/Sep/16 14:51
Worklog Time Spent: 10m
Work Description: GitHub user SolidWallOfCode opened a pull request:
https://github.com/apache/trafficserver/pull/967
TS-4555: Make CPP API use a reserved transaction arg.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/SolidWallOfCode/trafficserver ts-4555
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/trafficserver/pull/967.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #967
----
commit 2ae5cd81ef448429ace54d1769b99623425f7947
Author: Alan M. Carroll <[email protected]>
Date: 2016-09-06T14:49:35Z
TS-4555: Make CPP API use a reserved transaction arg.
----
Issue Time Tracking
-------------------
Worklog Id: (was: 28177)
Time Spent: 10m
Remaining Estimate: 0h
> C++ API takes a transaction argument without allocating it
> ----------------------------------------------------------
>
> Key: TS-4555
> URL: https://issues.apache.org/jira/browse/TS-4555
> Project: Traffic Server
> Issue Type: Bug
> Components: CPP API
> Reporter: James Peach
> Assignee: Alan M. Carroll
> Fix For: 7.0.0
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> {code}
> Transaction &
> utils::internal::getTransaction(TSHttpTxn ats_txn_handle)
> {
> Transaction *transaction = static_cast<Transaction
> *>(TSHttpTxnArgGet(ats_txn_handle, TRANSACTION_STORAGE_INDEX));
> if (!transaction) {
> transaction = new Transaction(static_cast<void *>(ats_txn_handle));
> LOG_DEBUG("Created new transaction object at %p for ats pointer %p",
> transaction, ats_txn_handle);
> TSHttpTxnArgSet(ats_txn_handle, TRANSACTION_STORAGE_INDEX, transaction);
> }
> return *transaction;
> }
> {code}
> {{TRANSACTION_STORAGE_INDEX}} is hardcoded constant that is not allocated by
> {{TSHttpArgIndexReserve}}, so it is subject to collisions with other plugins.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)