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

Function checkHttpTxnParentProxy

src/api/InkAPITest.cc:6997–7022  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6995};
6996
6997static int
6998checkHttpTxnParentProxy(ContData *data, TSHttpTxn txnp)
6999{
7000 const char *hostname = "txnpp.example.com";
7001 int port = 10180;
7002 const char *hostnameget = nullptr;
7003 int portget = 0;
7004
7005 TSHttpTxnParentProxySet(txnp, const_cast<char *>(hostname), port);
7006 if (TSHttpTxnParentProxyGet(txnp, &hostnameget, &portget) != TS_SUCCESS) {
7007 SDK_RPRINT(data->test, "TSHttpTxnParentProxySet", "TestCase1", TC_FAIL, "TSHttpTxnParentProxyGet doesn't return TS_SUCCESS");
7008 SDK_RPRINT(data->test, "TSHttpTxnParentProxyGet", "TestCase1", TC_FAIL, "TSHttpTxnParentProxyGet doesn't return TS_SUCCESS");
7009 return TS_EVENT_CONTINUE;
7010 }
7011
7012 if ((strcmp(hostname, hostnameget) == 0) && (port == portget)) {
7013 SDK_RPRINT(data->test, "TSHttpTxnParentProxySet", "TestCase1", TC_PASS, "ok");
7014 SDK_RPRINT(data->test, "TSHttpTxnParentProxyGet", "TestCase1", TC_PASS, "ok");
7015 data->test_passed_Parent_Proxy = true;
7016 } else {
7017 SDK_RPRINT(data->test, "TSHttpTxnParentProxySet", "TestCase1", TC_FAIL, "Value's Mismatch");
7018 SDK_RPRINT(data->test, "TSHttpTxnParentProxyGet", "TestCase1", TC_FAIL, "Value's Mismatch");
7019 }
7020
7021 return TS_EVENT_CONTINUE;
7022}
7023
7024static int
7025ssn_handler(TSCont contp, TSEvent event, void *edata)

Callers 1

ssn_handlerFunction · 0.85

Calls 4

TSHttpTxnParentProxySetFunction · 0.85
TSHttpTxnParentProxyGetFunction · 0.85
SDK_RPRINTFunction · 0.85
strcmpFunction · 0.85

Tested by

no test coverage detected