diff options
-rw-r--r-- | source3/include/ntdomain.h | 14 | ||||
-rw-r--r-- | source3/include/proto.h | 3 | ||||
-rw-r--r-- | source3/rpc_server/srv_pipe_hnd.c | 11 |
3 files changed, 12 insertions, 16 deletions
diff --git a/source3/include/ntdomain.h b/source3/include/ntdomain.h index da3dd14189..de0a313609 100644 --- a/source3/include/ntdomain.h +++ b/source3/include/ntdomain.h @@ -303,10 +303,8 @@ typedef struct smb_np_struct { /* * NamedPipe state information. - * - * (e.g. typecast a np_struct, above). */ - void *np_state; + struct pipes_struct *np_state; /* * NamedPipe functions, to be called to perform @@ -326,8 +324,8 @@ typedef struct smb_np_struct { /* call to perform a write namedpipe operation */ - ssize_t (*namedpipe_write)(void * np_state, - char *data, size_t n); + ssize_t (*namedpipe_write)(struct pipes_struct *p, + char *data, size_t n); /* call to perform a read namedpipe operation. * @@ -340,9 +338,9 @@ typedef struct smb_np_struct { * when samba is modified to use namedpipe_transact, * the pipe_outstanding argument may be removed. */ - ssize_t (*namedpipe_read)(void * np_state, - char *data, size_t max_len, - bool *pipe_outstanding); + ssize_t (*namedpipe_read)(struct pipes_struct *p, + char *data, size_t max_len, + bool *pipe_outstanding); } smb_np_struct; diff --git a/source3/include/proto.h b/source3/include/proto.h index 6e503efadd..d1d2c90905 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -8849,6 +8849,9 @@ struct pipes_struct *make_internal_rpc_pipe_p(const char *pipe_name, const char *client_address, struct auth_serversupplied_info *server_info, uint16_t vuid); +ssize_t read_from_internal_pipe(struct pipes_struct *p, char *data, size_t n, + bool *is_data_outstanding); +ssize_t write_to_internal_pipe(struct pipes_struct *p, char *data, size_t n); /* The following definitions come from rpc_server/srv_samr_nt.c */ diff --git a/source3/rpc_server/srv_pipe_hnd.c b/source3/rpc_server/srv_pipe_hnd.c index 2e77b5b903..bc6d180199 100644 --- a/source3/rpc_server/srv_pipe_hnd.c +++ b/source3/rpc_server/srv_pipe_hnd.c @@ -61,9 +61,6 @@ static struct bitmap *bmap; * system _anyway_. so that's the next step... */ -static ssize_t read_from_internal_pipe(void *np_conn, char *data, size_t n, - bool *is_data_outstanding); -static ssize_t write_to_internal_pipe(void *np_conn, char *data, size_t n); static int close_internal_rpc_pipe_hnd(struct pipes_struct *pipe); /**************************************************************************** @@ -925,9 +922,8 @@ ssize_t write_to_pipe(smb_np_struct *p, char *data, size_t n) Accepts incoming data on an internal rpc pipe. ****************************************************************************/ -static ssize_t write_to_internal_pipe(void *np_conn, char *data, size_t n) +ssize_t write_to_internal_pipe(struct pipes_struct *p, char *data, size_t n) { - pipes_struct *p = (pipes_struct*)np_conn; size_t data_left = n; while(data_left) { @@ -985,10 +981,9 @@ ssize_t read_from_pipe(smb_np_struct *p, char *data, size_t n, have been prepared into arrays of headers + data stream sections. ****************************************************************************/ -static ssize_t read_from_internal_pipe(void *np_conn, char *data, size_t n, - bool *is_data_outstanding) +ssize_t read_from_internal_pipe(struct pipes_struct *p, char *data, size_t n, + bool *is_data_outstanding) { - pipes_struct *p = (pipes_struct*)np_conn; uint32 pdu_remaining = 0; ssize_t data_returned = 0; |