MCPcopy Create free account
hub / github.com/apache/trafficserver / TSHttpTxnMilestoneGet

Function TSHttpTxnMilestoneGet

src/api/InkAPI.cc:5437–5453  ·  view source on GitHub ↗

Get a particular milestone hrtime'r. Note that this can return 0, which means it has not been set yet.

Source from the content-addressed store, hash-verified

5435// Get a particular milestone hrtime'r. Note that this can return 0, which means it has not
5436// been set yet.
5437TSReturnCode
5438TSHttpTxnMilestoneGet(TSHttpTxn txnp, TSMilestonesType milestone, ink_hrtime *time)
5439{
5440 sdk_assert(sdk_sanity_check_txn(txnp) == TS_SUCCESS);
5441 sdk_assert(sdk_sanity_check_null_ptr(time) == TS_SUCCESS);
5442 HttpSM *sm = reinterpret_cast<HttpSM *>(txnp);
5443 TSReturnCode ret = TS_SUCCESS;
5444
5445 if ((milestone < TS_MILESTONE_UA_BEGIN) || (milestone >= TS_MILESTONE_LAST_ENTRY)) {
5446 *time = -1;
5447 ret = TS_ERROR;
5448 } else {
5449 *time = sm->milestones[milestone];
5450 }
5451
5452 return ret;
5453}
5454
5455TSReturnCode
5456TSHttpTxnCachedRespTimeGet(TSHttpTxn txnp, time_t *resp_time)

Callers 4

InjectMilestonesHeaderFunction · 0.85
getPropertyMethod · 0.85

Calls 2

sdk_sanity_check_txnFunction · 0.85

Tested by

no test coverage detected