| 334 | } |
| 335 | |
| 336 | static void |
| 337 | load_buffer_cache_data(TxnSM *txn_sm) |
| 338 | { |
| 339 | /* transfer the data from the cache buffer (which must |
| 340 | fully be consumed on a VCONN_READY event, to the |
| 341 | server response buffer */ |
| 342 | int rdr_avail = TSIOBufferReaderAvail(txn_sm->q_cache_read_buffer_reader); |
| 343 | |
| 344 | Dbg(dbg_ctl, "entering buffer_cache_data"); |
| 345 | Dbg(dbg_ctl, "loading %d bytes to buffer reader", rdr_avail); |
| 346 | |
| 347 | TSAssert(rdr_avail > 0); |
| 348 | |
| 349 | TSIOBufferCopy(txn_sm->q_client_response_buffer, /* (cache response buffer) */ |
| 350 | txn_sm->q_cache_read_buffer_reader, /* (transient buffer) */ |
| 351 | rdr_avail, 0); |
| 352 | |
| 353 | TSIOBufferReaderConsume(txn_sm->q_cache_read_buffer_reader, rdr_avail); |
| 354 | } |
| 355 | |
| 356 | /* If the document is fully read out of the cache, close the |
| 357 | cache read_vc, send the document to the client. Otherwise, |
no test coverage detected