| 5679 | /* Connections */ |
| 5680 | |
| 5681 | TSVConn |
| 5682 | TSVConnCreate(TSEventFunc event_funcp, TSMutex mutexp) |
| 5683 | { |
| 5684 | if (mutexp == nullptr) { |
| 5685 | mutexp = reinterpret_cast<TSMutex>(new_ProxyMutex()); |
| 5686 | } |
| 5687 | |
| 5688 | // TODO: probably don't need this if memory allocations fails properly |
| 5689 | sdk_assert(sdk_sanity_check_mutex(mutexp) == TS_SUCCESS); |
| 5690 | |
| 5691 | if (pluginThreadContext) { |
| 5692 | pluginThreadContext->acquire(); |
| 5693 | } |
| 5694 | |
| 5695 | INKVConnInternal *i = THREAD_ALLOC(INKVConnAllocator, this_thread()); |
| 5696 | |
| 5697 | sdk_assert(sdk_sanity_check_null_ptr((void *)i) == TS_SUCCESS); |
| 5698 | |
| 5699 | i->init(event_funcp, mutexp, pluginThreadContext); |
| 5700 | return reinterpret_cast<TSVConn>(i); |
| 5701 | } |
| 5702 | |
| 5703 | struct ActionSink : public Continuation { |
| 5704 | ActionSink() : Continuation(nullptr) { SET_HANDLER(&ActionSink::mainEvent); } |
no test coverage detected