From: Volker Lendecke Date: Sat, 31 Jan 2009 15:17:25 +0000 (+0100) Subject: Remove unused np_read sync wrapper X-Git-Tag: samba-4.0.0alpha7~417^2~196 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fa7ddc78b8da8265096b1cc45471e1c7c96ac994;p=thirdparty%2Fsamba.git Remove unused np_read sync wrapper --- diff --git a/source3/include/proto.h b/source3/include/proto.h index 081225614f1..fd556690aa1 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -6323,8 +6323,6 @@ struct async_req *np_read_send(TALLOC_CTX *mem_ctx, struct event_context *ev, uint8_t *data, size_t len); NTSTATUS np_read_recv(struct async_req *req, ssize_t *nread, bool *is_data_outstanding); -NTSTATUS np_read(struct fake_file_handle *handle, uint8_t *data, size_t len, - ssize_t *nread, bool *is_data_outstanding); /* The following definitions come from rpc_server/srv_samr_util.c */ diff --git a/source3/rpc_server/srv_pipe_hnd.c b/source3/rpc_server/srv_pipe_hnd.c index 813561bac4c..0a4d94fedc8 100644 --- a/source3/rpc_server/srv_pipe_hnd.c +++ b/source3/rpc_server/srv_pipe_hnd.c @@ -1285,33 +1285,3 @@ NTSTATUS np_read_recv(struct async_req *req, ssize_t *nread, *is_data_outstanding = state->is_data_outstanding; return NT_STATUS_OK; } - -NTSTATUS np_read(struct fake_file_handle *handle, uint8_t *data, size_t len, - ssize_t *nread, bool *is_data_outstanding) -{ - TALLOC_CTX *frame = talloc_stackframe(); - struct event_context *ev; - struct async_req *req; - NTSTATUS status; - - ev = event_context_init(frame); - if (ev == NULL) { - status = NT_STATUS_NO_MEMORY; - goto fail; - } - - req = np_read_send(frame, ev, handle, data, len); - if (req == NULL) { - status = NT_STATUS_NO_MEMORY; - goto fail; - } - - while (req->state < ASYNC_REQ_DONE) { - event_loop_once(ev); - } - - status = np_read_recv(req, nread, is_data_outstanding); - fail: - TALLOC_FREE(frame); - return status; -}