| 6995 | }; |
| 6996 | |
| 6997 | static int |
| 6998 | checkHttpTxnParentProxy(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 | |
| 7024 | static int |
| 7025 | ssn_handler(TSCont contp, TSEvent event, void *edata) |
no test coverage detected