| 301 | } |
| 302 | |
| 303 | stream_hook* stream::remove_hook() |
| 304 | { |
| 305 | stream_hook* hook = hook_; |
| 306 | hook_ = NULL; |
| 307 | |
| 308 | if (stream_->type == ACL_VSTREAM_TYPE_FILE) { |
| 309 | stream_->fread_fn = acl_file_read; |
| 310 | stream_->fwrite_fn = acl_file_write; |
| 311 | stream_->fwritev_fn = acl_file_writev; |
| 312 | stream_->fclose_fn = acl_file_close; |
| 313 | } else { |
| 314 | stream_->read_fn = acl_socket_read; |
| 315 | stream_->write_fn = acl_socket_write; |
| 316 | stream_->writev_fn = acl_socket_writev; |
| 317 | stream_->close_fn = acl_socket_close; |
| 318 | } |
| 319 | |
| 320 | return hook; |
| 321 | } |
| 322 | |
| 323 | #define HOOK_KEY "stream::setup_hook" |
| 324 |
no outgoing calls
no test coverage detected