s3-rpc_server: Remove obsolete FAKE_FILE_TYPE_NAMED_PIPE handling.
authorAndreas Schneider <asn@samba.org>
Wed, 23 Oct 2013 15:16:10 +0000 (17:16 +0200)
committerStefan Metzmacher <metze@samba.org>
Tue, 29 Oct 2013 15:28:58 +0000 (16:28 +0100)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source3/rpc_server/srv_pipe_hnd.c

index 8a26afb4af83e576ab6a7812b6871959addc8a27..a95aa06525a780f0187699b75c9bdeec5e9bb929 100644 (file)
@@ -411,8 +411,7 @@ bool fsp_is_np(struct files_struct *fsp)
 
        type = fsp->fake_file_handle->type;
 
-       return ((type == FAKE_FILE_TYPE_NAMED_PIPE)
-               || (type == FAKE_FILE_TYPE_NAMED_PIPE_PROXY));
+       return (type == FAKE_FILE_TYPE_NAMED_PIPE_PROXY);
 }
 
 NTSTATUS np_open(TALLOC_CTX *mem_ctx, const char *name,
@@ -503,10 +502,6 @@ NTSTATUS np_open(TALLOC_CTX *mem_ctx, const char *name,
 
 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 npa_state *p =
                        talloc_get_type_abort(handle->private_data,
@@ -555,21 +550,6 @@ struct tevent_req *np_write_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
                goto post_status;
        }
 
-       if (handle->type == FAKE_FILE_TYPE_NAMED_PIPE) {
-               struct npa_state *npa =
-                       talloc_get_type_abort(handle->private_data,
-                                             struct npa_state);
-               struct pipes_struct *p =
-                       talloc_get_type_abort(npa->private_data,
-                                             struct pipes_struct);
-
-               state->nwritten = write_to_internal_pipe(p, (const char *)data, len);
-
-               status = (state->nwritten >= 0)
-                       ? NT_STATUS_OK : NT_STATUS_UNEXPECTED_IO_ERROR;
-               goto post_status;
-       }
-
        if (handle->type == FAKE_FILE_TYPE_NAMED_PIPE_PROXY) {
                struct npa_state *p = talloc_get_type_abort(
                        handle->private_data, struct npa_state);
@@ -734,22 +714,6 @@ struct tevent_req *np_read_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
                return NULL;
        }
 
-       if (handle->type == FAKE_FILE_TYPE_NAMED_PIPE) {
-               struct npa_state *npa =
-                       talloc_get_type_abort(handle->private_data,
-                                             struct npa_state);
-               struct pipes_struct *p =
-                       talloc_get_type_abort(npa->private_data,
-                                             struct pipes_struct);
-
-               state->nread = read_from_internal_pipe(
-                       p, (char *)data, len, &state->is_data_outstanding);
-
-               status = (state->nread >= 0)
-                       ? NT_STATUS_OK : NT_STATUS_UNEXPECTED_IO_ERROR;
-               goto post_status;
-       }
-
        if (handle->type == FAKE_FILE_TYPE_NAMED_PIPE_PROXY) {
                struct npa_state *p = talloc_get_type_abort(
                        handle->private_data, struct npa_state);