| 578 | } |
| 579 | |
| 580 | void |
| 581 | FetchSM::process_fetch_write(int event) |
| 582 | { |
| 583 | Dbg(dbg_ctl, "[%s] calling process write", __FUNCTION__); |
| 584 | switch (event) { |
| 585 | case TS_EVENT_VCONN_WRITE_COMPLETE: |
| 586 | req_finished = true; |
| 587 | break; |
| 588 | case TS_EVENT_VCONN_WRITE_READY: |
| 589 | // data is processed in chunks of 32k; if there is more than 32k |
| 590 | // of input data, we have to continue reenabling until all data is |
| 591 | // read (we have already written all the data to the buffer) |
| 592 | if (req_reader->read_avail() > 0) { |
| 593 | ((PluginVC *)http_vc)->reenable(write_vio); |
| 594 | } |
| 595 | break; |
| 596 | case TS_EVENT_ERROR: |
| 597 | if (fetch_flags & TS_FETCH_FLAGS_STREAM) { |
| 598 | return InvokePluginExt(event); |
| 599 | } |
| 600 | InvokePlugin(callback_events.failure_event_id, nullptr); |
| 601 | cleanUp(); |
| 602 | break; |
| 603 | default: |
| 604 | break; |
| 605 | } |
| 606 | } |
| 607 | |
| 608 | int |
| 609 | FetchSM::fetch_handler(int event, void *edata) |
nothing calls this directly
no test coverage detected