void HTTPInfo::set_buffer_reference(RefCountObj* block_ref) Setting a buffer reference for the alt is separate from the unmarshalling operation because the clustering utilizes the system differently than cache does The cache maintains external refcounting of the buffer that the alt is in & doesn't always destroy the alt when its done with it because it figures it doesn't need to since it is manag
| 2397 | // to set up the reference |
| 2398 | // |
| 2399 | void |
| 2400 | HTTPInfo::set_buffer_reference(RefCountObj *block_ref) |
| 2401 | { |
| 2402 | ink_assert(m_alt->m_magic == CACHE_ALT_MAGIC_ALIVE); |
| 2403 | |
| 2404 | // Free existing reference |
| 2405 | if (m_alt->m_ext_buffer != nullptr) { |
| 2406 | if (m_alt->m_ext_buffer->refcount_dec() == 0) { |
| 2407 | m_alt->m_ext_buffer->free(); |
| 2408 | } |
| 2409 | } |
| 2410 | // Set up the ref count for the external buffer |
| 2411 | // if there is one |
| 2412 | if (block_ref) { |
| 2413 | block_ref->refcount_inc(); |
| 2414 | } |
| 2415 | |
| 2416 | m_alt->m_ext_buffer = block_ref; |
| 2417 | } |
| 2418 | |
| 2419 | int |
| 2420 | HTTPInfo::get_handle(char *buf, int len) |
nothing calls this directly
no test coverage detected