| 4949 | } |
| 4950 | |
| 4951 | TSReturnCode |
| 4952 | TSHttpTxnParentSelectionUrlSet(TSHttpTxn txnp, TSMBuffer bufp, TSMLoc obj) |
| 4953 | { |
| 4954 | sdk_assert(sdk_sanity_check_txn(txnp) == TS_SUCCESS); |
| 4955 | sdk_assert(sdk_sanity_check_mbuffer(bufp) == TS_SUCCESS); |
| 4956 | sdk_assert(sdk_sanity_check_url_handle(obj) == TS_SUCCESS); |
| 4957 | |
| 4958 | HttpSM *sm = reinterpret_cast<HttpSM *>(txnp); |
| 4959 | URL u, *l_url; |
| 4960 | |
| 4961 | u.m_heap = (reinterpret_cast<HdrHeapSDKHandle *>(bufp))->m_heap; |
| 4962 | u.m_url_impl = reinterpret_cast<URLImpl *>(obj); |
| 4963 | if (!u.valid()) { |
| 4964 | return TS_ERROR; |
| 4965 | } |
| 4966 | |
| 4967 | l_url = sm->t_state.cache_info.parent_selection_url; |
| 4968 | if (!l_url) { |
| 4969 | sm->t_state.cache_info.parent_selection_url_storage.create(nullptr); |
| 4970 | sm->t_state.cache_info.parent_selection_url = &(sm->t_state.cache_info.parent_selection_url_storage); |
| 4971 | l_url = sm->t_state.cache_info.parent_selection_url; |
| 4972 | } |
| 4973 | |
| 4974 | if (!l_url || !l_url->valid()) { |
| 4975 | return TS_ERROR; |
| 4976 | } else { |
| 4977 | l_url->copy(&u); |
| 4978 | } |
| 4979 | |
| 4980 | Dbg(dbg_ctl_parent_select, "TSHttpTxnParentSelectionUrlSet() parent_selection_url : addr = %p val = %p", |
| 4981 | &(sm->t_state.cache_info.parent_selection_url), sm->t_state.cache_info.parent_selection_url); |
| 4982 | |
| 4983 | return TS_SUCCESS; |
| 4984 | } |
| 4985 | |
| 4986 | void |
| 4987 | TSHttpTxnUntransformedRespCache(TSHttpTxn txnp, int on) |
no test coverage detected