Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/common/tio.h
diff options
context:
space:
mode:
authorArthur de Jong <arthur@arthurdejong.org>2012-03-14 21:31:38 +0100
committerArthur de Jong <arthur@arthurdejong.org>2012-03-14 21:31:38 +0100
commit15498aca67bc96b1ac5dbd35be40d8c69a0e2d73 (patch)
tree8b6f423140943cddd0a808a39c4e8cf20eb72a57 /common/tio.h
parentc4d9aa9908c7551968660b34791f48cdbf6acb1f (diff)
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
Diffstat (limited to 'common/tio.h')
-rw-r--r--common/tio.h6
1 files changed, 4 insertions, 2 deletions
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. */