const char *client_address,
struct auth_serversupplied_info *server_info,
struct fake_file_handle **phandle);
+bool np_read_in_progress(struct fake_file_handle *handle);
struct tevent_req *np_write_send(TALLOC_CTX *mem_ctx, struct event_context *ev,
struct fake_file_handle *handle,
const uint8_t *data, size_t len);
return NT_STATUS_OK;
}
+bool np_read_in_progress(struct fake_file_handle *handle)
+{
+ if (handle->type == FAKE_FILE_TYPE_NAMED_PIPE) {
+ return false;
+ }
+
+ if (handle->type == FAKE_FILE_TYPE_NAMED_PIPE_PROXY) {
+ struct np_proxy_state *p = talloc_get_type_abort(
+ handle->private_data, struct np_proxy_state);
+ size_t read_count;
+
+ read_count = tevent_queue_length(p->read_queue);
+ if (read_count > 0) {
+ return true;
+ }
+
+ return false;
+ }
+
+ return false;
+}
+
struct np_write_state {
struct event_context *ev;
struct np_proxy_state *p;