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

Function TSHttpSsnReenable

src/api/InkAPI.cc:3810–3843  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3808};
3809
3810void
3811TSHttpSsnReenable(TSHttpSsn ssnp, TSEvent event)
3812{
3813 sdk_assert(sdk_sanity_check_http_ssn(ssnp) == TS_SUCCESS);
3814
3815 ProxySession *cs = reinterpret_cast<ProxySession *>(ssnp);
3816 EThread *eth = this_ethread();
3817
3818 // If this function is being executed on a thread created by the API
3819 // which is DEDICATED, the continuation needs to be called back on a
3820 // REGULAR thread. Specially an ET_NET thread
3821 if (!eth->is_event_type(ET_NET)) {
3822 EThread *affinity_thread = cs->getThreadAffinity();
3823 if (affinity_thread && affinity_thread->is_event_type(ET_NET)) {
3824 NetHandler *nh = get_NetHandler(affinity_thread);
3825 affinity_thread->schedule_imm(new TSHttpSsnCallback(cs, nh->mutex, event), ET_NET);
3826 } else {
3827 eventProcessor.schedule_imm(new TSHttpSsnCallback(cs, cs->mutex, event), ET_NET);
3828 }
3829 } else {
3830 MUTEX_TRY_LOCK(trylock, cs->mutex, eth);
3831 if (!trylock.is_locked()) {
3832 EThread *affinity_thread = cs->getThreadAffinity();
3833 if (affinity_thread && affinity_thread->is_event_type(ET_NET)) {
3834 NetHandler *nh = get_NetHandler(affinity_thread);
3835 affinity_thread->schedule_imm(new TSHttpSsnCallback(cs, nh->mutex, event), ET_NET);
3836 } else {
3837 eventProcessor.schedule_imm(new TSHttpSsnCallback(cs, cs->mutex, event), ET_NET);
3838 }
3839 } else {
3840 cs->handleEvent(static_cast<int>(event), nullptr);
3841 }
3842 }
3843}
3844
3845/* HTTP transactions */
3846void

Callers 15

server_push_pluginFunction · 0.85
ssn_handlerFunction · 0.85
ssn_handlerFunction · 0.85
sessionHandlerFunction · 0.85
globalHandlerFunction · 0.85
global_handlerFunction · 0.85
handle_order_1Function · 0.85
handle_order_2Function · 0.85
sessionContFuncFunction · 0.85
globalContFuncFunction · 0.85
handle_orderFunction · 0.85
global_handlerFunction · 0.85

Calls 7

this_ethreadFunction · 0.85
get_NetHandlerFunction · 0.85
is_event_typeMethod · 0.80
getThreadAffinityMethod · 0.80
schedule_immMethod · 0.45
handleEventMethod · 0.45

Tested by 6

ssn_handlerFunction · 0.68
global_handlerFunction · 0.68
sessionContFuncFunction · 0.68
globalContFuncFunction · 0.68
handle_ssn_closeFunction · 0.68
handle_ssn_startFunction · 0.68