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

Method udp_callback

src/iocore/net/UnixUDPNet.cc:682–703  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

680}
681
682int
683UDPNetProcessorInternal::udp_callback(UDPNetHandler *, UDPConnection *xuc, EThread *thread)
684{
685 UnixUDPConnection *uc = static_cast<UnixUDPConnection *>(xuc);
686
687 if (uc->continuation && uc->mutex) {
688 MUTEX_TRY_LOCK(lock, uc->mutex, thread);
689 if (!lock.is_locked()) {
690 return 1;
691 }
692 uc->AddRef();
693 uc->callbackHandler(0, nullptr);
694 return 0;
695 } else {
696 ink_assert(!"doesn't reach here");
697 if (!uc->callbackAction) {
698 uc->AddRef();
699 uc->callbackAction = eventProcessor.schedule_imm(uc);
700 }
701 return 0;
702 }
703}
704
705#define UNINITIALIZED_EVENT_PTR (Event *)0xdeadbeef
706

Callers 1

waitForActivityMethod · 0.80

Calls 3

AddRefMethod · 0.80
callbackHandlerMethod · 0.80
schedule_immMethod · 0.45

Tested by

no test coverage detected