From 08b628efe40bd93993ed4b662d924436444bb242 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 15 Aug 2010 14:56:19 +0200 Subject: s3: Remove some unused code --- source3/include/proto.h | 1 - source3/libsmb/clientgen.c | 31 ------------------------------- 2 files changed, 32 deletions(-) (limited to 'source3') diff --git a/source3/include/proto.h b/source3/include/proto.h index 0a417ab043..c6061fc9ed 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -1878,7 +1878,6 @@ bool cli_state_seqnum_persistent(struct cli_state *cli, bool cli_state_seqnum_remove(struct cli_state *cli, uint16_t mid); bool cli_receive_smb(struct cli_state *cli); -ssize_t cli_receive_smb_data(struct cli_state *cli, char *buffer, size_t len); bool cli_receive_smb_readX_header(struct cli_state *cli); bool cli_send_smb(struct cli_state *cli); bool cli_send_smb_direct_writeX(struct cli_state *cli, diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c index c530c1434f..608288dbcf 100644 --- a/source3/libsmb/clientgen.c +++ b/source3/libsmb/clientgen.c @@ -285,37 +285,6 @@ bool cli_receive_smb(struct cli_state *cli) return true; } -/**************************************************************************** - Read the data portion of a readX smb. - The timeout is in milliseconds -****************************************************************************/ - -ssize_t cli_receive_smb_data(struct cli_state *cli, char *buffer, size_t len) -{ - NTSTATUS status; - - set_smb_read_error(&cli->smb_rw_error, SMB_READ_OK); - - status = read_fd_with_timeout( - cli->fd, buffer, len, len, cli->timeout, NULL); - if (NT_STATUS_IS_OK(status)) { - return len; - } - - if (NT_STATUS_EQUAL(status, NT_STATUS_END_OF_FILE)) { - set_smb_read_error(&cli->smb_rw_error, SMB_READ_EOF); - return -1; - } - - if (NT_STATUS_EQUAL(status, NT_STATUS_IO_TIMEOUT)) { - set_smb_read_error(&cli->smb_rw_error, SMB_READ_TIMEOUT); - return -1; - } - - set_smb_read_error(&cli->smb_rw_error, SMB_READ_ERROR); - return -1; -} - static ssize_t write_socket(int fd, const char *buf, size_t len) { ssize_t ret=0; -- cgit