From ca9ac7c4c7adc9d726f1fc1fa2b061bd181e3d7a Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 2 Apr 2011 16:44:40 +0200 Subject: s3: Remove cli_write Signed-off-by: Jeremy Allison --- source3/libsmb/clientgen.c | 45 --------------------------------------------- 1 file changed, 45 deletions(-) (limited to 'source3/libsmb/clientgen.c') diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c index 7eb10c4f1d..cec645b4a6 100644 --- a/source3/libsmb/clientgen.c +++ b/source3/libsmb/clientgen.c @@ -379,51 +379,6 @@ bool cli_send_smb(struct cli_state *cli) return true; } -/**************************************************************************** - Send a "direct" writeX smb to a fd. -****************************************************************************/ - -bool cli_send_smb_direct_writeX(struct cli_state *cli, - const char *p, - size_t extradata) -{ - /* First length to send is the offset to the data. */ - size_t len = SVAL(cli->outbuf,smb_vwv11) + 4; - size_t nwritten=0; - struct iovec iov[2]; - - /* fd == -1 causes segfaults -- Tom (tom@ninja.nl) */ - if (cli->fd == -1) { - return false; - } - - if (client_is_signing_on(cli)) { - DEBUG(0,("cli_send_smb_large: cannot send signed packet.\n")); - return false; - } - - iov[0].iov_base = (void *)cli->outbuf; - iov[0].iov_len = len; - iov[1].iov_base = CONST_DISCARD(void *, p); - iov[1].iov_len = extradata; - - nwritten = write_data_iov(cli->fd, iov, 2); - if (nwritten < (len + extradata)) { - close(cli->fd); - cli->fd = -1; - cli->smb_rw_error = SMB_WRITE_ERROR; - DEBUG(0,("Error writing %d bytes to client. (%s)\n", - (int)(len+extradata), strerror(errno))); - return false; - } - - /* Increment the mid so we can tell between responses. */ - cli->mid++; - if (!cli->mid) - cli->mid++; - return true; -} - /**************************************************************************** Setup basics in a outgoing packet. ****************************************************************************/ -- cgit