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

Function action_cancel_handler

src/api/InkAPITest.cc:2421–2437  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2419static int *SDK_ActionCancel_pstatus;
2420
2421int
2422action_cancel_handler(TSCont contp, TSEvent event, void * /* edata ATS_UNUSED */)
2423{
2424 if (event == TS_EVENT_IMMEDIATE) { // called from schedule_imm OK
2425 SDK_RPRINT(SDK_ActionCancel_test, "TSActionCancel", "TestCase1", TC_PASS, "ok");
2426 *SDK_ActionCancel_pstatus = REGRESSION_TEST_PASSED;
2427 } else if (event == TS_EVENT_TIMEOUT) { // called from schedule_in Not OK.
2428 SDK_RPRINT(SDK_ActionCancel_test, "TSActionCancel", "TestCase1", TC_FAIL, "bad action");
2429 *SDK_ActionCancel_pstatus = REGRESSION_TEST_FAILED;
2430 } else { // there is sth wrong
2431 SDK_RPRINT(SDK_ActionCancel_test, "TSActionCancel", "TestCase1", TC_FAIL, "bad event");
2432 *SDK_ActionCancel_pstatus = REGRESSION_TEST_FAILED;
2433 }
2434
2435 TSContDestroy(contp);
2436 return 0;
2437}
2438
2439REGRESSION_TEST(SDK_API_TSActionCancel)(RegressionTest *test, int /* atype ATS_UNUSED */, int *pstatus)
2440{

Callers

nothing calls this directly

Calls 2

SDK_RPRINTFunction · 0.85
TSContDestroyFunction · 0.85

Tested by

no test coverage detected