Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/common/tio.c
Commit message (Collapse)AuthorAgeFilesLines
* fix setting deadline microsecond value (thanks Julien ↵Arthur de Jong2012-12-081-1/+1
| | | | | | Cristau) (r1848 from trunk) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd-0.8@1850 ef36b2f9-881f-0410-afb5-c4e39611909c
* use poll() instead of select() for checking file ↵Arthur de Jong2012-10-121-92/+42
| | | | | | descriptor activity to also correctly work if more than FD_SETSIZE files are already open git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1783 ef36b2f9-881f-0410-afb5-c4e39611909c
* check if the file descriptor can be stored in the ↵Arthur de Jong2012-10-121-0/+15
| | | | | | select() file descriptor set git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1781 ef36b2f9-881f-0410-afb5-c4e39611909c
* split the functionality to read everything from the ↵Arthur de Jong2012-04-261-9/+24
| | | | | | stream into a separate function and don't assume we use non-blocking IO (fix r1637) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1659 ef36b2f9-881f-0410-afb5-c4e39611909c
* read any remaining available data from the stream when ↵Arthur de Jong2012-03-141-2/+31
| | | | | | 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
* ensure that we don't try to read more than SSIZE_MAX bytesArthur de Jong2012-03-141-2/+9
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1636 ef36b2f9-881f-0410-afb5-c4e39611909c
* tv_usec in struct timeval must be lower than 1000000 ↵Arthur de Jong2011-03-311-1/+1
| | | | | | (patch by SATOH Fumiyasu) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1421 ef36b2f9-881f-0410-afb5-c4e39611909c
* fix a problem in the timeout paramater that was being ↵Arthur de Jong2011-03-141-1/+1
| | | | | | passed to select() and could contain too many µsec (fixes Solaris runtime issue) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1393 ef36b2f9-881f-0410-afb5-c4e39611909c
* update copyright headers to add missing yearsArthur de Jong2011-03-101-1/+1
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1384 ef36b2f9-881f-0410-afb5-c4e39611909c
* return connection reset when connection was closed by ↵Arthur de Jong2010-12-261-1/+6
| | | | | | the other end git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1344 ef36b2f9-881f-0410-afb5-c4e39611909c
* remove commented out memberOf and ipNetmaskNumber ↵Arthur de Jong2010-06-121-1/+0
| | | | | | attributes and small cleanups git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1138 ef36b2f9-881f-0410-afb5-c4e39611909c
* rename software to nss-pam-ldapdArthur de Jong2009-08-311-1/+1
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@978 ef36b2f9-881f-0410-afb5-c4e39611909c
* restore the old writing code which masks SIGPIPE on ↵Arthur de Jong2008-06-121-0/+21
| | | | | | platforms that can't use send() git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@758 ef36b2f9-881f-0410-afb5-c4e39611909c
* use send() with a flag to ignore SIGPIPE instead of ↵Arthur de Jong2008-05-171-15/+3
| | | | | | write() so we don't have to muck with signal handlers git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@740 ef36b2f9-881f-0410-afb5-c4e39611909c
* add sanity checks to sleep calls to never sleep too long ↵Arthur de Jong2008-05-161-4/+14
| | | | | | (problems could occur when the clock moves backwards) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@738 ef36b2f9-881f-0410-afb5-c4e39611909c
* split out the flushing of the buffers to separate ↵Arthur de Jong2008-02-151-38/+84
| | | | | | functions and see if we can flush some data from the buffer if it is overflowing before growing the buffer git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@635 ef36b2f9-881f-0410-afb5-c4e39611909c
* implement resizable I/O buffers and tune buffer sizes to ↵Arthur de Jong2008-02-121-26/+65
| | | | | | normal requests git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@630 ef36b2f9-881f-0410-afb5-c4e39611909c
* always allocate the read and write buffers and make the ↵Arthur de Jong2008-02-121-85/+61
| | | | | | struct tio_buffer inline in struct tio_fileinfo git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@629 ef36b2f9-881f-0410-afb5-c4e39611909c
* when including stdint.h check if we actually have itArthur de Jong2008-01-271-0/+2
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@571 ef36b2f9-881f-0410-afb5-c4e39611909c
* add limited implementation of tio_mark() and tio_reset() ↵Arthur de Jong2008-01-011-14/+51
| | | | | | functions to do limited seeks in the read stream, clean up header file comments and write tests for new code git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@547 ef36b2f9-881f-0410-afb5-c4e39611909c
* fix memory leak in I/O module not free()ing allocated ↵Arthur de Jong2007-10-271-3/+6
| | | | | | storage for file info on file close git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@462 ef36b2f9-881f-0410-afb5-c4e39611909c
* portability improvement to fall back to ETIMEDOUT when ↵Arthur de Jong2007-10-271-0/+5
| | | | | | ETIME is unavailable git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@461 ef36b2f9-881f-0410-afb5-c4e39611909c
* fix usage of DEBUG_TIO_STATSArthur de Jong2007-10-191-2/+3
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@440 ef36b2f9-881f-0410-afb5-c4e39611909c
* also initialize sa_sigaction although it's not usedArthur de Jong2007-09-241-0/+1
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@423 ef36b2f9-881f-0410-afb5-c4e39611909c
* some small improvements to the code based on some source ↵Arthur de Jong2007-09-231-0/+2
| | | | | | code checks git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@418 ef36b2f9-881f-0410-afb5-c4e39611909c
* fix typoArthur de Jong2007-07-151-1/+1
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@306 ef36b2f9-881f-0410-afb5-c4e39611909c
* fix bug with buffer magic in writing codeArthur de Jong2007-07-151-11/+18
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@305 ef36b2f9-881f-0410-afb5-c4e39611909c
* add const and add FIXME about a to-be-fixed race conditionArthur de Jong2007-07-131-1/+5
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@301 ef36b2f9-881f-0410-afb5-c4e39611909c
* implement our own stdio-like library that handles IO ↵Arthur de Jong2007-06-091-0/+365
with a simple configurable timeout mechanism with buffering git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@272 ef36b2f9-881f-0410-afb5-c4e39611909c