From 15498aca67bc96b1ac5dbd35be40d8c69a0e2d73 Mon Sep 17 00:00:00 2001 From: Arthur de Jong Date: Wed, 14 Mar 2012 20:31:38 +0000 Subject: read any remaining available data from the stream when closing the connection in a normal way to prevent Broken pipe messages in nslcd git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1637 ef36b2f9-881f-0410-afb5-c4e39611909c --- common/tio.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'common/tio.h') diff --git a/common/tio.h b/common/tio.h index 22c099c..832367b 100644 --- a/common/tio.h +++ b/common/tio.h @@ -2,7 +2,7 @@ tio.h - timed io functions This file is part of the nss-pam-ldapd library. - Copyright (C) 2007, 2008 Arthur de Jong + Copyright (C) 2007, 2008, 2010, 2012 Arthur de Jong This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -56,7 +56,9 @@ TFILE *tio_fdopen(int fd,struct timeval *readtimeout,struct timeval *writetimeou /* Read the specified number of bytes from the stream. */ int tio_read(TFILE *fp,void *buf,size_t count); -/* Read and discard the specified number of bytes from the stream. */ +/* Read and discard the specified number of bytes from the stream. + If count is 0 reads and discards any data that can be read and empties + the read buffer. */ int tio_skip(TFILE *fp,size_t count); /* Write the specified buffer to the stream. */ -- cgit v1.2.3