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

Function handle_msg

tests/tools/plugins/continuations_verify.cc:53–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51static int stat_test_done = 0; // Incremented when receiving a traffic_ctl message
52
53static int
54handle_msg(TSCont contp, TSEvent event, void * /* edata ATS_UNUSED */)
55{
56 if (event == TS_EVENT_LIFECYCLE_MSG) { // External trigger, such as traffic_ctl
57 Dbg(dbg_ctl_msg, "event TS_EVENT_LIFECYCLE_MSG");
58 // Send to a ET net thread just to be sure.
59 // Turns out the msg is sent to a task thread, but task
60 // threads do not get their thread local copy of the stats
61 // merged in. So externally, test.done was stuck at 0 without
62 // the Schedule to a NET thread
63 TSContScheduleOnPool(contp, 0, TS_THREAD_POOL_NET);
64 } else {
65 Dbg(dbg_ctl_msg, "event %d", event);
66 TSStatIntIncrement(stat_test_done, 1);
67 }
68 return 0;
69}
70
71/**
72 This function is called on every request and logs session and transaction

Callers

nothing calls this directly

Calls 2

TSContScheduleOnPoolFunction · 0.85
TSStatIntIncrementFunction · 0.85

Tested by

no test coverage detected