From 40ae8b74b669ced9dee0c33e15bc5e0ac8680506 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 15 Aug 2010 16:02:37 +0200 Subject: s3: Remove smbd_server_fd() from write_data() This completely removes the DEBUG(0, ..) error message from write_data(). I've gone through all callers of write_data() and made sure that they have their own equivalent error message printing. --- source3/lib/util_sock.c | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) (limited to 'source3/lib/util_sock.c') diff --git a/source3/lib/util_sock.c b/source3/lib/util_sock.c index bf04af10bd..bb14c5d885 100644 --- a/source3/lib/util_sock.c +++ b/source3/lib/util_sock.c @@ -660,26 +660,7 @@ ssize_t write_data(int fd, const char *buffer, size_t N) iov.iov_base = CONST_DISCARD(void *, buffer); iov.iov_len = N; - - ret = write_data_iov(fd, &iov, 1); - if (ret >= 0) { - return ret; - } - - if (fd == smbd_server_fd()) { - char addr[INET6_ADDRSTRLEN]; - /* - * Try and give an error message saying what client failed. - */ - DEBUG(0, ("write_data: write failure in writing to client %s. " - "Error %s\n", get_peer_addr(fd,addr,sizeof(addr)), - strerror(errno))); - } else { - DEBUG(0,("write_data: write failure. Error = %s\n", - strerror(errno) )); - } - - return -1; + return write_data_iov(fd, &iov, 1); } /**************************************************************************** -- cgit