| 22 | static int ts_lua_transform_handler(TSCont contp, ts_lua_http_transform_ctx *transform_ctx, TSEvent event, int n); |
| 23 | |
| 24 | int |
| 25 | ts_lua_client_entry(TSCont contp, TSEvent ev, void *edata) |
| 26 | { |
| 27 | int n, event; |
| 28 | TSVIO input_vio; |
| 29 | ts_lua_http_transform_ctx *transform_ctx; |
| 30 | |
| 31 | event = (int)ev; |
| 32 | transform_ctx = (ts_lua_http_transform_ctx *)TSContDataGet(contp); |
| 33 | |
| 34 | n = 0; |
| 35 | |
| 36 | switch (event) { |
| 37 | case TS_EVENT_ERROR: |
| 38 | input_vio = TSVConnWriteVIOGet(contp); |
| 39 | TSContCall(TSVIOContGet(input_vio), TS_EVENT_ERROR, input_vio); |
| 40 | break; |
| 41 | |
| 42 | case TS_EVENT_VCONN_WRITE_COMPLETE: |
| 43 | Dbg(dbg_ctl, "[%s] received TS_EVENT_VCONN_WRITE_COMPLETE", __FUNCTION__); |
| 44 | break; |
| 45 | |
| 46 | case TS_LUA_EVENT_COROUTINE_CONT: |
| 47 | n = (intptr_t)edata; |
| 48 | /* FALL THROUGH */ |
| 49 | case TS_EVENT_VCONN_WRITE_READY: |
| 50 | default: |
| 51 | ts_lua_client_handler(contp, transform_ctx, TSEvent(event), n); |
| 52 | break; |
| 53 | } |
| 54 | |
| 55 | return 0; |
| 56 | } |
| 57 | |
| 58 | static int |
| 59 | ts_lua_client_handler(TSCont contp, ts_lua_http_transform_ctx *transform_ctx, TSEvent event, int n) |
nothing calls this directly
no test coverage detected